Using if statement to add 1 to total

dsimpson68 - Oct 27, 2009 at 09:35 AM
 jimbo - Jul 9, 2016 at 03:51 PM
I am trying to get a formula to add + 1 to a total cell based on the word typed. Example : If I type the word Duty in cells B3:B18 then add + 1 to cell B35. If there are 6 entries of duty then 6 should show in B35. However if there is another word such as Leave then do not count. I would like those tallied in B36. Is there a way to do this?
Dave Simpson

1 reply

Hi Dave,

To count how many times the word "Duty" appears in the range B3:B18 use this formula in B35:
=SUM(IF(B3:B18="Duty",1,0)) confirm this formula by pressing Control+Shift+Enter.

Do the same for the word "Leave" in B36 by replacing the word "Duty" by "Leave" in the formula.

Best regards,
Thanks so much ! Works perfectly.

This formula does not work!