Wildcard

MRomanow

New Member
Joined
Mar 10, 2005
Messages
46
Can I use a wildcard in a formula looking at numerical values?

F(OR(E20="PBX",F20="SB*",F20="ZE*"),"N","Y"))

This is the fomula looking at SB43 through SB60 and ZE20 through ZE30 and I cannot get it to work. Any ideas??
 
What if the OP has a "ZE" or "SB" in E20.... would he/she want an "N"..... judging by the original post...not necessarily....hence my version above.
 
Upvote 0

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
What if the OP has a "ZE" or "SB" in E20.... would he/she want an "N"..... judging by the original post...not necessarily....hence my version above.
-NBVC

Yeah, not so fast fancypants, I hadn't gotten to you yet... you overdid it, actually :biggrin:, per the OP, we didn't need to wildcard the PBX test, i.e.<ul>[*]=IF(OR("PBX"=E20,ISNUMBER(FIND({"SB","ZE"},F20))),"N","Y")[/list] would have worked.

Aladin,

  • You thanking me??? I'm so indebted to you that I cannot even think of an appropriate analogy...
  • Thanks for that formula because I was wracking my brain trying to overcome the weakness of that FIND()/SEARCH() wildcard test in that we really needed that to return 1 to be testing for SB* and not *SB*.
 
Upvote 0
What if the OP has a "ZE" or "SB" in E20.... would he/she want an "N"..... judging by the original post...not necessarily....hence my version above.
-NBVC

Yeah, not so fast fancypants, I hadn't gotten to you yet... you overdid it, actually :biggrin:, per the OP, we didn't need to wildcard the PBX test, i.e.<ul>[*]=IF(OR("PBX"=E20,ISNUMBER(FIND({"SB","ZE"},F20))),"N","Y")[/list] would have worked.

Well, there you go then...I gave them a bonus...so whether it's on it's own or part of a string... it'll work.... :LOL: The other offering will assume the same for that string.
 
Upvote 0
NBVC, while I like yours (though I would have used SEARCH, not FIND due to FIND's case sensitivity); I have to give the nod to our guru on this one since it can be more easily adapted to avoid yielding false positives on column F values like "ZZE30" or "ASB40" i.e. <ul>[*]=IF(SUM(COUNTIF(E20:F20,{"PBX","SB*","ZE*"})),"N","Y")[/list]
 
Upvote 0
NBVC, while I like yours (though I would have used SEARCH, not FIND due to FIND's case sensitivity); I have to give the nod to our guru on this one since it can be more easily adapted to avoid yielding false positives on column F values like "ZZE30" or "ASB40" i.e. <ul>[*]=IF(SUM(COUNTIF(E20:F20,{"PBX","SB*","ZE*"})),"N","Y")[/list]

That's cool...

I guess I used FIND because the OP's samples were all caps... this would assist in keeping entries consistant....but I probably should have stated that fact. :cool:

Thanks Greg.
 
Upvote 0
Someday I might be able to come up with stuff as slick as you guys :cool: ... whenever I come up with something I think is robust, one of you guys (rightfully) shows a better more robust way of doing it :eek: , and I feel like a rube again :oops:

I'll keep trying, though :wink:
 
Upvote 0
...whenever I come up with something I think is robust, one of you guys (rightfully) shows a better more robust way of doing it :eek: , and I feel like a rube again :oops: I'll keep trying, though :wink:
-hatman

Do you have any inkling as to how many times Aladin, Fairwinds or Barry [Houdini] have done the same to me?! For a while I thought Barry was stalking me! And Aladin? 9 times out of 10 there's some interesting little tweak that makes his much more robust than whatever I'd come up with; but I'm too thick to see it; so I'll ask and Mr. Akyurek will kindly explain to me the scenarios that I had not taken into consideration. So definitely keep trying and do not take it personally! AA outwits us all; routinely.
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,260
Members
449,075
Latest member
staticfluids

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