Countifs with asterisk wildcard

allday79

New Member
Joined
Mar 21, 2017
Messages
5
My problem is: Count the number of companies in Pennsylvania with Sales exceeding $2,000 and whose telephone area code is (610). Hint: Use a wildcard asterisk (*).
I currently have =COUNTIFS(State,H290,Sales,">2000",Telephone,"610*").
Getting a value of 0.

Do i need to keep the () around the 610? Tried multiple ways of stating this and I am still getting 0. Should be 7.

Filtered data is below. Appreciate any help. Thank you

ST
Sales (000 000) Telephone
PA $ 4,469(610) 694-2424
PA $ 2,515(610) 768-3300
PA $ 2,515(610) 768-3300
PA $ 2,515(610) 768-3300
PA $ 2,738(610) 644-1300
PA $ 2,037(610) 834-6301
PA $ 2,467(610) 378-0500

<colgroup><col><col><col></colgroup><tbody>
</tbody>
 
in cell H290 is PA (column for State)
sales are in accounting format.

for a previous question: Count the number of companies in California selling Semiconductors and related devices with more than 1,500 employees and more than $2,500 in sales. My formula was: =COUNTIFS(State,H11,L2:L374,L16,Employees,">1500",Sales,">2500") which worked fine. Something with this asterisk I believe is screwing me up.

P.S. Can I edit my post to get rid of all that crap i accidentally posted. I don't think anyone here reads the Matrix.
 
Upvote 0

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
its hard to say because

=COUNTIFS(State,H290,Sales,">2000",Telephone,"*610*")

works fine on the sample data you posted.

maybe double check your named ranges
 
Upvote 0
Why not check what is actually in the first three characters of one of those phone numbers, i.e. if your first phone number was in cell C2:
Code:
=LEFT(C2,3)
That will show you what is really there, regardless of the format.
 
Upvote 0
It's not the asterisk that is causing the issue. All "*610*" does is look for any cell that has 610 in it with any number of characters before the 6 and any number of characters after the 0. It is your criteria that is at fault somewhere.
What is in H290? or H11?
 
Upvote 0
you can add a column that will take the first 3 tele number =mid(c3,2,3) and then use this ==COUNTIFS(State,H290,Sales,">2000",new column,"610")
i will also recommend checking the formula without the last condition first to make sure the problem is the telephone number
 
Upvote 0
you can add a column that will take the first 3 tele number =mid(c3,2,3) and then use this ==COUNTIFS(State,H290,Sales,">2000",new column,"610")
i will also recommend checking the formula without the last condition first to make sure the problem is the telephone number

I used this and it worked for me. I also ran the formula without the last condition, Telephone, and that worked. But I don't see anything wrong with the range though.

Thank you all for the help. :)
 
Upvote 0

Similar threads

Forum statistics

Threads
1,215,268
Messages
6,123,975
Members
449,137
Latest member
yeti1016

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