Count formula with execpt

cactusjomak

New Member
Joined
Feb 17, 2005
Messages
22
I have found an issue in my count formula: =COUNTA(B11:B23)

This just counts the value, but I need it to exclude the words "VAC" "OUT" "H" is there a way to do this?

(the values that I count are like "7a-5p")
 

Some videos you may like

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,201
cactusjomak said:
I have found an issue in my count formula: =COUNTA(B11:B23)

This just counts the value, but I need it to exclude the words "VAC" "OUT" "H" is there a way to do this?

(the values that I count are like "7a-5p")

One of:

=COUNTA(B11:B23)-SUM(COUNTIF(B11:B23,{"VAC","OUT","H"}))

=SUMPRODUCT(--ISNA(MATCH(B11:B23,{"VAC","OUT","H"},0)))
 

cactusjomak

New Member
Joined
Feb 17, 2005
Messages
22
[quote="Aladin Akyurek
One of:

=COUNTA(B11:B23)-SUM(COUNTIF(B11:B23,{"VAC","OUT","H"}))

=SUMPRODUCT(--ISNA(MATCH(B11:B23,{"VAC","OUT","H"},0)))[/quote]

Yes, I need to be educated in formulas :confused: THANKS!
 

Watch MrExcel Video

Forum statistics

Threads
1,122,463
Messages
5,596,284
Members
414,051
Latest member
tabecker

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