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

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
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,214,651
Messages
6,120,738
Members
448,988
Latest member
BB_Unlv

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