Count three text values

jmersing

Well-known Member
Joined
Apr 14, 2004
Messages
887
I need to count three different textvalues in the range

G11:CX298

Rover, ADDS, Dist


I was trying countif but keep getting a syntax error.
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
the sumif function will do this very easily - oir you can use sumproduct. I personally find the sumif approach more "approachable" i.e. I can read the formula very easily - and my poor little brain manages to follow. The sumproduct is probably the clever and more effecient way to go - just try doing a search on sumproduct on this site and you will see lots of examples - however I suspect someone will be along shortly....
 
Upvote 0
I tried this and it seems to work, but I'll bet there is a better way

=COUNTIF($G11:AH298,"=DIST")/4+COUNTIF($G11:AH298,"=ROVER")/4+COUNTIF($G11:AH298,"=ADDS")/4

Thanks
 
Upvote 0
Try the following array formulas that need to be confirmed with CONTROL+SHIFT+ENTER...

=SUM(COUNTIF(G11:CX298,{"Rover","ADDS","Dist"}))

OR

=SUM(COUNTIF(G11:CX298,A1:A3))

...where A1:A3 contains your 'text values'.

Hope this helps!
 
Upvote 0
jmersing said:
I need to count three different textvalues in the range

G11:CX298

Rover, ADDS, Dist


I was trying countif but keep getting a syntax error.

1]

=SUM(COUNTIF(G11:CX298,{"Rover","ADDS","Dist"}))

2]

=SUMPRODUCT(COUNTIF(G11:CX298,A1:A3))

where A1:A3 houses Rover, ADDS, and Dist.
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,256
Members
448,558
Latest member
aivin

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