Formula

justine

New Member
Joined
Feb 16, 2002
Messages
27
I have the following formula for a worksheet.
=IF(SUM('Daily Lates'!L8)=0,"",SUM('Daily Lates'!L8))

However, we want to add to this. We want to have a countif for Quit and for Injured along with the NS. If there are cells that say quit for the person we would like the cell to say N/A or NA. Is this possible? and if so, how do I do it?
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
On 2002-04-11 10:17, justine wrote:
I have the following formula for a worksheet.
=IF(SUM('Daily Lates'!L8)=0,"",SUM('Daily Lates'!L8))

However, we want to add to this. We want to have a countif for Quit and for Injured along with the NS. If there are cells that say quit for the person we would like the cell to say N/A or NA. Is this possible? and if so, how do I do it?

This might be along the lines of what you want:
=IF(COUNTIF('Daily Lates'!L8,"Quit")>0,"N/A",IF(SUM('Daily Lates'!L8)=0,"",SUM('Daily Lates'!L8)))

[I notice that you are summing just one cell in this example. In such a case, you could go with
=IF('Daily Lates'!L8="Quit","N/A",IF('Daily Lates'!L8=0,"",'Daily Lates'!L8))
 
Upvote 0
Hiya,

A few questions:

You wrote:
...
have the following formula for a worksheet.
=IF(SUM('Daily Lates'!L8)=0,"",SUM('Daily Lates'!L8))
...
I am unclear on the purpose of the sum's. You may wish to simplify the above formula to: =IF('Daily Lates'!L8=0,"",'Daily Lates'!L8) -> unless you slipped in a typo and meant L8 to be a range.


Continuing what your wrote:
...
However, we want to add to this. We want to have a countif for Quit and for Injured along with the NS. If there are cells that say quit for the person we would like the cell to say N/A or NA. Is this possible? and if so, how do I do it?
...
Does this mean you need a countif with 2 criterion (person and "Quit" for example)? Or perhaps you are looking for something more direct like:

=If(Countif(L2:L28,"Quit")>0,"N/A",IF(L8=0,"",L8))

Feel free to toss in some data for us to get a feel of what your shooting for (examples are good).

Hope that helps somewhat
Adam
 
Upvote 0

Forum statistics

Threads
1,213,482
Messages
6,113,908
Members
448,532
Latest member
9Kimo3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top