Help with match formula

G

New Member
Joined
Aug 19, 2002
Messages
41
=IF(ISNUMBER(MATCH("***"&"*P*",E2,0)),"0","1")

How do I fix this formula to look for both * & P in no particuliar order?

Once again Thank you in advance for your help......
G
 
Aladin,

You are so right, you do have a name and I am sorry. I did test your suggestion, and found ?*? does not get everything. However, I have attached my sheet to show reasons for "0" & "1", choice of "Font"....
Combined Kmart & Coolidge Code & Rate.xls
DEFGHI
1Store#*CodeTaxRateOpen/ClosedCheck*CodesAssociate
21889/9681CO0130.71FixKMC
31889/9681CO0230.71FixKMC
41898/3161MA188.02831FixGCS
51900/3293*ALP2.7780OKJAL
61900/3293PO01111.371FixJAL
71903/3633FA0133.411FixGCS
81905/3899*COU1.3741FixJAL
Data
 
Upvote 0

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
On 2002-11-06 12:17, G wrote:
Mark,

...Can you explain why both your formula & mine formula come out with the same results?...

=IF(ISNUMBER(MATCH("?*?"&"*P*",E2,0)),"0","1")

"?*?"&"*P*" doesn't check for or require the presence of an asterisk ("*"). A tilde must be used to idenfify "*" (e.g., "~*").

Also, "?*?"&"*P*", is the same "?*?*P*". And, in turn is the same as "??*P* which requires a P to be preceded (at a minumum) by any 2 characters. Is that what you intend? Provide some examples of text strings that you expect to pass and fail a desired wildcard pattern.
 
Upvote 0
G, I just saw your posting above...

"~**"&"*P*" is the same as "~**P*" which requires a leading asterisk (*) and a P anywhere in the text string following the asterisk.
 
Upvote 0
Mark,

I used your formula, because as Aladin pointed out, my formula does not catch all. You formula is exactly what I want, I just did not know it until ALADIN pointed it out to me.

Thank you for all of your help so that I could understand what I was looking at.

Sincerely,
G
 
Upvote 0

Forum statistics

Threads
1,214,819
Messages
6,121,749
Members
449,050
Latest member
excelknuckles

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