# countif formula help

#### John Caines

##### Well-known Member
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

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

#### MrKowz

##### Well-known Member
Try:

=SUMPRODUCT(--(ISNUMBER(SEARCH("Europe",\$H\$25:\$H\$65536))))

#### John Caines

##### Well-known Member
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'll try it now

Best regards
John Caines

#### T. Valko

##### Well-known Member
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'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

Replies
7
Views
201
Replies
2
Views
268
Replies
1
Views
289
Replies
10
Views
115
Replies
3
Views
118

1,191,707
Messages
5,988,230
Members
440,139
Latest member
ngaicuong2017

### 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.

### Which adblocker are you using?

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

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