Advice on a formula

datadummy

Active Member
Joined
Mar 16, 2017
Messages
312
Office Version
  1. 365
Platform
  1. Windows
I am using the following formula =COUNTIF(Sheet1!F:F,"*MEDICAL CENTER : PROPERTY : BHU") this is returning an incorrect count and I can't figure out why, there are only 9 events and my formula is returning 148. The portion in parenthesis is copied and pasted from the raw data to assure I captured it exactly as it is entered. Any suggestions on a better more precise formula?
 
Just for giggles, try typing your CRITERIA text in some cell and then refer to that cell in the COUNTIF formula.
Excel Formula:
=COUNTIF(B12,H200)
 
Upvote 0

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
View attachment 85984
Here are the 9 entries.

MEDICAL CENTER : PROPERTY : BHU
MEDICAL CENTER : PROPERTY : BHU
MEDICAL CENTER : PROPERTY : BHU
MEDICAL CENTER : PROPERTY : BHU
MEDICAL CENTER : PROPERTY : BHU
MEDICAL CENTER : PROPERTY : BHU
MEDICAL CENTER : PROPERTY : BHU
MEDICAL CENTER : PROPERTY : BHU
MEDICAL CENTER : PROPERTY : BHU
 
Upvote 0
Just for giggles, try typing your CRITERIA text in some cell and then refer to that cell in the COUNTIF formula.
Excel Formula:
=COUNTIF(B12,H200)
H200 being "some cell"
 
Upvote 0
Sorry...
Excel Formula:
=COUNTIF(Sheet1!F:F,H200)
 
Upvote 0
those are all identical. but i can throw some dummy data around. But I'd like to see what you have as there could be some conflicts in your data.
 
Upvote 0
Here is my formula for it:
Mr Excel 8.xlsm
AB
1
2=COUNTIF($A$3:$A$14,"MEDICAL CENTER : PROPERTY : BHU")9
3MEDICAL CENTER : PROPERTY : BHU
4MEDICAL CENTER : PROPERTY : BHU
5ajfdkljfajd
6MEDICAL CENTER : PROPERTY : BHU
7MEDICAL CENTER : PROPERTY : BHU
8dsfsgs
9dfajfk
10MEDICAL CENTER : PROPERTY : BHU
11MEDICAL CENTER : PROPERTY : BHU
12MEDICAL CENTER : PROPERTY : BHU
13MEDICAL CENTER : PROPERTY : BHU
14MEDICAL CENTER : PROPERTY : BHU
Sheet18
Cell Formulas
RangeFormula
A2A2=FORMULATEXT(B2)
B2B2=COUNTIF($A$3:$A$14,"MEDICAL CENTER : PROPERTY : BHU")
 
Upvote 0
is the cell where the calculation is on Sheet1? If so, please remove "Sheet1" from the reference.
 
Upvote 0
Sorry...
Excel Formula:
=COUNTIF(Sheet1!F:F,H200)
I took the context of the formula and put it in a single cell and followed your steps and it returned 1. Is this what you would anticipate?
 
Upvote 0
I type before I think sometimes....
I took the context of the formula and put it in a single cell and followed your steps and it returned 1. Is this what you would anticipate?
Did you type MEDICAL CENTER : PROPERTY : BHU in cell H200?
 
Upvote 0

Forum statistics

Threads
1,215,093
Messages
6,123,067
Members
449,090
Latest member
fragment

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