Probs with OR nested in COUNTIF function

50gumbys

Board Regular
Joined
Nov 12, 2002
Messages
54
In a spreadsheet we are tracking two types of tasks that people do.
Within a defined range of cells, entries will either be an "I" or a "W".

We want to count the number of times either an "I" or a "W" is entered.

The calculation I thought would do the trick is:
=COUNTIF(Schedule!B11:F11,OR(i,w))

However, I'm getting errors on the OR function.

Using just the letters (I or W), I get a #NAME? error.
If I surround the letters in double quotes, I get a #VALUE! error.

I played with it and found OR accepts numerics.
But that doesn't help me here.

Is there something else I can use to achieve a count?

Thank you VERY much !!
Lori
 

Some videos you may like

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Brian from Maui

MrExcel MVP
Joined
Feb 16, 2002
Messages
8,458
50gumbys said:
In a spreadsheet we are tracking two types of tasks that people do.
Within a defined range of cells, entries will either be an "I" or a "W".

We want to count the number of times either an "I" or a "W" is entered.

The calculation I thought would do the trick is:
=COUNTIF(Schedule!B11:F11,OR(i,w))

However, I'm getting errors on the OR function.

Using just the letters (I or W), I get a #NAME? error.
If I surround the letters in double quotes, I get a #VALUE! error.

I played with it and found OR accepts numerics.
But that doesn't help me here.

Is there something else I can use to achieve a count?

Thank you VERY much !!
Lori

Either,

=COUNTIF(Range,Criteria)+(COUNTIF(Range,Criteria)

or

=SUMPRODUCT(--(B11:F11={"I","W"}))
 

50gumbys

Board Regular
Joined
Nov 12, 2002
Messages
54
Yippeeeeeee !!!!!!!!!!!!

She works like a store-bought one!

Thank you SO much !! :biggrin:
 

50gumbys

Board Regular
Joined
Nov 12, 2002
Messages
54
Wow!
That's a good one too!!
This is like being in a candy store!!
Thank you!!
 

Watch MrExcel Video

Forum statistics

Threads
1,126,971
Messages
5,621,891
Members
415,864
Latest member
cybid

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
Top