ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Wildcard - help I'm stuck (https://www.excelbanter.com/excel-programming/326501-wildcard-help-im-stuck.html)

Nathan Bloomfield

Wildcard - help I'm stuck
 
How do I insert a wildcard in the following query?

=IF(VLOOKUP(G5,Calendar!$A:$G,7) = "*Q*",blah blah,blah blah)

Thanks
Nathan

OJ[_2_]

Wildcard - help I'm stuck
 
Hi,
try this

=IF(ISERROR(FIND("Q",VLOOKUP(G4,$A$1:$E$8,5,0)))," Q is NOT present","Q
Is Present")

replace FIND with SEARCH if you want case insensitive...

Hth,
OJ


OJ[_2_]

Wildcard - help I'm stuck
 
Hi,
I forgot to mention that this will return "Q is NOT present" if the
vlookup produces an error....is that an issue? If so, try this...

=IF(ISERROR(VLOOKUP(G5,Calendar!$A:$G,*7)),"VLOOKU P
FAILED",IF(ISERROR(FIND("Q",VLOOKUP(G5,Calendar!$A :$G,*7))),"Q is NOT
present","Q
Is Present"))

Regards,
OJ


Nathan Bloomfield

Wildcard - help I'm stuck
 
Thanks OJ,

Worked a treat.

Cheers,
Nathan

"OJ" wrote in message oups.com...
Hi,
I forgot to mention that this will return "Q is NOT present" if the
vlookup produces an error....is that an issue? If so, try this...

=3DIF(ISERROR(VLOOKUP(G5,Calendar!$A:$G,=AD7)),"VL OOKUP
FAILED",IF(ISERROR(FIND("Q",VLOOKUP(G5,Calendar!$A :$G,=AD7))),"Q is NOT
present","Q=20
Is Present"))

Regards,
OJ



All times are GMT +1. The time now is 10:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com