simple Wildcard Question

N

nastech

I've been trying to make wild cards work, don't see any actual equation
examples in help. Just the simple version for something like:

if(a1="b"*,"true")

for cell a1 = b1 or b2..
don't know where to put the quotation marks/ wildcards, isn't working, thanks.
obviously needs to be a number field..
 
P

Peo Sjoblom

One way

=IF(LEFT(A1,1)="b","do this","do that")

wildcards can be used in several function

but not in logical functions, so you have to use workarounds,
for your example LEFT will work, for *b* you can use

=IF(ISNUMBER(SEARCH("b",A1)),"do this","do that")

for *b

=IF(RIGHT(A1,1), and so on



--
Regards,

Peo Sjoblom

(No private emails please)
 
N

nastech

Thankyou... been a problem for awhile.. later

Peo Sjoblom said:
One way

=IF(LEFT(A1,1)="b","do this","do that")

wildcards can be used in several function

but not in logical functions, so you have to use workarounds,
for your example LEFT will work, for *b* you can use

=IF(ISNUMBER(SEARCH("b",A1)),"do this","do that")

for *b

=IF(RIGHT(A1,1), and so on



--
Regards,

Peo Sjoblom

(No private emails please)
 
B

Bryan Hessey

To test if A1 is equal to B1 or B2 is
=IF(OR(A1=B1,A1=B2),"True","")

Wildcards are used to match characters in a search etc, not to modif
formula ranges.
 
Top