Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=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 |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=--ISNUMBER(FIND(910,A1))
"Archon007" wrote: 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 |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
if a1 is 910111564 or 910465465 it will return 1
=--ISNUMBER(FIND(910,A1)) 123456910 Biff "Teethless mama" wrote in message ... =--ISNUMBER(FIND(910,A1)) "Archon007" wrote: 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 |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
wildcard in formula vlookup | Excel Discussion (Misc queries) | |||
Wildcard IF formula | Excel Worksheet Functions | |||
How do I use wildcard characters in Excel 2003 sumif formula? | Excel Worksheet Functions | |||
How do I use a wildcard or multiple of a cell value in a formula? | Excel Worksheet Functions | |||
Wildcard Character in an Array Formula | Excel Discussion (Misc queries) |