countif formula help

John Caines

Well-known Member
Joined
Aug 28, 2006
Messages
1,155
Office Version
  1. 2019
Platform
  1. Windows
Hello All.
I have a COUNTIF formula that is as follows;
Code:
=COUNTIF($H$25:$H$65536,"Europe")

Thing is,,, it finds,,, sorry counts all occurrences with Europe in Column H.
What my problem is is now I have some that say EUROPE-USA,,,, But I still want to count this.

Is there any way to Change the formula so it says,, "Hey,, if Europe Is mentioned in a cell,, regardless of what is mentioned also,,, count it pleas"

Only,, I don't know how to code this :-(

I hope the above makes sense.
If anybody can show me that would be great.
Many thanks for all your time.
Regards
John Caines
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Try:

=SUMPRODUCT(--(ISNUMBER(SEARCH("Europe",$H$25:$H$65536))))
 
Upvote 0
Many thanks for your reply MrKowz,,,
great stuff,,,, I shall try this now.....

As a note,,, been hunting on the forum and this seems to work also,,,

Code:
=COUNTIF($H$25:$H$65536,"Europe*")

I think so,,, I best test it a bit more,,, just adding the * sign in the formula....
I never knew about this..

Many thanks again for your reply MrKowz.

I'll try it now

Best regards
John Caines
 
Upvote 0
Many thanks for your reply MrKowz,,,
great stuff,,,, I shall try this now.....

As a note,,, been hunting on the forum and this seems to work also,,,

Code:
=COUNTIF($H$25:$H$65536,"Europe*")

I think so,,, I best test it a bit more,,, just adding the * sign in the formula....
I never knew about this..

Many thanks again for your reply MrKowz.

I'll try it now

Best regards
John Caines
The asterisk is a wildcard and means "any character or characters or no characters at all".

So:

COUNT IF cells in the range H25:H65536 contain an entry that starts with the string "Europe" followed by anything or nothing.

The ? question mark is also a wildcard and means "any single character".

Note that wildcards only work on TEXT.

Functions that support wildcards:

SUMIF - all versions of Excel
COUNTIF - all versions of Excel
SEARCH - all versions of Excel
MATCH - all versions of Excel
HLOOKUP - all versions of Excel
VLOOKUP - all versions of Excel
SUMIFS - Excel 2007 and later
COUNTIFS - Excel 2007 and later
AVERAGEIF - Excel 2007 and later
AVERAGEIFS - Excel 2007 and later
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,280
Members
452,902
Latest member
Knuddeluff

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