![]() |
Wildcards
Can we use wildcards in an IF function?
|
Wildcards
Sorry, we cannot use wildcards in IF function.
-- Kind Regards Colo /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ Colo of 'The Road of The Cell Masters' :) URL:http://www.interq.or.jp/sun/puremis/...astersLink.htm /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ "HELP ME PLEASE!" wrote in message ... Can we use wildcards in an IF function? |
Wildcards
anonymous,
Please at least post with a first name. It makes it seem more personal. (It doesn't have to be your real name either) For a formula solution, try this: Type the text "Wildcard" into A1 =IF(ISERROR(SEARCH("*ldca*",A1)),"NG","OK") If you're looking for a VBA solution, this might work for you. By nature of the way the INSTR function works, it'll check for the presence of one string within another. There is no "wildcard", per se, but if the string that you're looking for appears within the searched string, it'll give you the position of where the match was found (which will always be greater than zero. Sub TestMe() If (InStr(1, Range("A1"), "ildca")) 0 Then MsgBox "Match" Else MsgBox "No Match" End If End Sub John "HELP ME PLEASE!" wrote in message ... Can we use wildcards in an IF function? |
Wildcards
If you mean in VBA, probably not, but
Look at VBA help for LIKE, INSTR, MID, LEFT, RIGHT -- Regards, Tom Ogilvy "HELP ME PLEASE!" wrote in message ... Can we use wildcards in an IF function? |
All times are GMT +1. The time now is 08:35 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com