using wildcard in countifs

snowman1976

Board Regular
Joined
Nov 4, 2008
Messages
191
hello
I have this formula that I use to determine if I can 'kill' a row if it meets the 4 criteria's in a different tab called kill_list.
it works fine, but if I try to apply a wildcard in column B of the kill_list the formula fails. It wants a numeric value in order for it to work

what is the proper wildcard to use so I can apply the formula ? I have tried * and ? and neither work. is there a better method?


IF(COUNTIFS(kill_list!A:A,B17,kill_list!B:B,D17,kill_list!C:C,"<="&K17,kill_list!D:D,">="&K17)>0,"KILL","")
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Try this:

Code:
=[COLOR=#333333]IF(COUNTIFS(kill_list!A:A,B17,kill[/COLOR][B]_list!B:B,"*"&D17&"*",kill_list!C:C,"<="&K17,kill_list!D:D,">="&K17)>0,"KILL","")[/B]

Godspeed!
 
Upvote 0
thanks, but that isnt quite what I was looking for. i want the wildcard to be in the kill_list, and that is where its failing - my countifs formula won't use it and apply it to any number I have in D17.

Below is the what the kill_list looks like. I want the countifs to meet all the criteria, but some cases I dont care for the tool number and that is where I am trying to use the wildcard but its not working

LineTool # to removeStart DateEnd Date
Car251/1/201712/31/2017
Bus1611/1/201712/31/2017
Van2811/1/201712/31/2017
Van2831/1/201712/31/2017
Van2771/1/201712/31/2017
Van2781/1/201712/31/2017
Van2851/1/201712/31/2017
Van2791/1/201712/31/2017
Truck*6/12/201712/31/2017

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
this didnt work for me, I even tried to dumb it down to see if a simple countif with the one criteria would work and it still doesnt
 
Upvote 0
Maybe you can place an example with data and formula.
 
Upvote 0
I made a simpler version of the problem below.
In columns A and B is the data set
In D and E is what I am counting, and if I find a match in both cases the formula is TRUE

my countifs formula is this in cell F2:
IF(COUNTIFS(A:A,D2,B:B,E2)>0,TRUE,FALSE)

I want this to come back as TRUE, because I have the wildcard in column B against train...so I am trying to find all cases of Train in this case regardless of the number I am also looking up. However, this is not working and I dont know how to use a wildcard with the countifs, which is what I am trying to figure out. Where I am really applying this is much more data, so just putting an if statement to say =if(D2="train", true) would not work. I hope I explained this well




ABCDEF
1BUS1BUS1TRUE
2CAR5TRAIN10FALSE
3TRAIN*CAR10FALSE
4PLANE10

<colgroup><col><col><col><col><col><col span="2"></colgroup><tbody>
</tbody>
 
Upvote 0
Try in F2

=IF(SUMPRODUCT(COUNTIFS(A:A,D2,B:B,CHOOSE({1,2},E2,"*")))>0,TRUE,FALSE)

Hope this helps

M.
 
Upvote 0
=or(countifs(b:b,e2,c:c,f2),countifs(b:b,e2,c:c,"~*"))
 
Upvote 0

Forum statistics

Threads
1,214,622
Messages
6,120,576
Members
448,972
Latest member
Shantanu2024

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