MrExcel Publishing
Your One Stop for Excel Tips & Solutions

IF Help


Posted by Jo on December 27, 2001 10:28 AM

Is there a formula that will add up how many NS and L are in a row and put the total at the end of that row (one cell for NS and one for L's).


Posted by Jacob on December 27, 2001 10:41 AM

Hi

Countif will do what you want.

Jacob

Posted by denis on December 27, 2001 10:44 AM

COUNTIF FORMULA WILL WORK

USE THIS FORULA =COUNTIF(A1:A10,"NS")
THIS FORMULA WILL COUNT HOW MANY "NS" THERE ARE IN THE RANGE A1 TO A10.
USE THE FORUMLA =COUNTIF(A1:A10,"L") TO COUNT THE NUMBER OF L'S THERE ARE

Posted by Jo on December 27, 2001 11:17 AM

Re: COUNTIF FORMULA WILL WORK (Can you do one more thing to this?)

This worked perfectly. I was wondering if the employee didn't have any NS or L that week is there a way to have it return the countif value as a blank cell?

Posted by Jacob on December 27, 2001 11:21 AM

Re: COUNTIF FORMULA WILL WORK (Can you do one more thing to this?)

If there are no values then it would be 0 there are to ways to make this blank. Use conditional formatting and make all 0 white or use this formula:

=if(COUNTIF(A1:A10,"NS")=0,"",COUNTIF(A1:A10,"NS")


Jacob