Countif function help

Coachclw87

New Member
Joined
Dec 8, 2017
Messages
7
I am trying to use the count if function and I am running into a bit of an issue. Just for example I want to count the number of cells that contain the text "1h", so I type the formula =countif(P9:P13,"*1h*")
The answer I am looking for should be 1, but it's coming back as 2. It's counting one of the cells that contains "21h" in the cell. Any suggestions?
 
See if this works.
I used cell Q7 to add the extra search (change to range you want to use).
If cell Q7 is left blank it would return 2 in the example below.
Excel Workbook
PQ
6Find with Code Chart D5
7D
81
934R+ 30H+
1034R-
1121D+ 1H#
1234R- 21H+
131H
Sheet
 
Upvote 0

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Forum statistics

Threads
1,223,910
Messages
6,175,320
Members
452,635
Latest member
laura12345

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