View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Davison Bob Davison is offline
external usenet poster
 
Posts: 26
Default How do I use a wildcard in an excel formula?

Here are better ways to do it:

=IF(LEFT(A1,3)=TEXT($E$1,"0"),1,0) ...where the value in cell E1 equals the
3-digit search value.

or better...
=IF(LEFT(A1,LEN($E$1))=TEXT($E$1,"0"),1,0) ...where the value in cell E1
equals the search value of variable length.

or even...
=IF(LEFT(A1,LEN(numString))=TEXT(numString,"0"),1, 0) ...where the value in
the single-cell named range "numString" equals a search value of variable
length.

This avoids hard-coding the formula.

Bob


"Bob Davison" wrote in message
...
=IF(LEFT(A1,3)="910",1,0)

"Archon007" wrote in message
...
I am try to have an if command search a row of data and then print 1 if it
matchs and a 0 if it doesn't. However the data is a long string of
numbers
that can be identified after reading the first 3. So instead of having
to
type it all out I'd like it to do something like.

=if(a1=910*,1,0)

the * meaning anything after 910 that matches, so if a1 is 910111564 or
910465465 it will return 1, but if it is 911(anything) it will return a 0

Thanks