The function of tetrabutyl ammonium ions (TBA+) in a sensitizer used in dye-sensitized solar cells (DSC) is contradictory. TBA+ can reduce unwanted charge-recombination by protecting the TiO2 surface and reduce dye aggregation, enhancing the photovoltaic performance. It will also compete with the dye-loading on the TiO2 film, decreasing the short-circuit current density of the cell. Three ruthenium sensitizers (DYE III, DUY11, and DUY12 containing two H+, one H+/one TBA+, and two TBA+, respectively) were prepared to systematically investigate the function of TBA+ in a dye for DSC under both standard sunlight and indoor illumination. The optical properties and frontier orbital energy level of the sensitizers are not influenced significantly by the number of TBA+. Under the standard 1 sun illumination, DSCs based on DUY11 (containing one H+ and one TBA+) achieved the highest power conversion efficiency (PCE) of 11.47%. Overall, optimized DSCs sensitized by the three ruthenium dyes all have the PCE over 10%, which is higher than that (9.95%) of N719-dyed cell fabricated at the same conditions. Under the illumination of a light emitting diode (LED), DSCs sensitized by DUY11 also have the highest efficiency of 19%. Furthermore, DUY12 with two TBA+ exhibits superior photovoltaic performance compared to a DYE III (containing two H+ in the anchoring ligands)-dyed cell; although these two dyes have similar photovoltaic performance under standard 1 sun lighting. The important function of TBA+ in reducing the charge recombination (by protecting TiO2 surface and avoiding dye aggregation) of a DSC under indoor lighting (when small number of electrons were excited by weak light) is also revealed.