Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF() with #VALUE
IF(search(A1, B2)0,A,B)
I'm searching for a string in A1 in the cell B2, if B2 contains A1, search() returns starting position of A1, and operation A is performed. However, when it is not there, #VALUE is returned. How do I get operation B? Thank you |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF() with #VALUE
=IF(ISNUMBER(SEARCH(A1,B2)),"A","B")
-- Regards, Peo Sjoblom "avgrin" wrote in message ... IF(search(A1, B2)0,A,B) I'm searching for a string in A1 in the cell B2, if B2 contains A1, search() returns starting position of A1, and operation A is performed. However, when it is not there, #VALUE is returned. How do I get operation B? Thank you |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF() with #VALUE
Try this:
=IF(ISNUMBER(SEARCH(A1,B2),A,B) This way, if SEARCH returns a number (starting position), A is performed. Anything else (like #VALUE!), B is performed. HTH, Elkar "avgrin" wrote: IF(search(A1, B2)0,A,B) I'm searching for a string in A1 in the cell B2, if B2 contains A1, search() returns starting position of A1, and operation A is performed. However, when it is not there, #VALUE is returned. How do I get operation B? Thank you |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF() with #VALUE
=IF(ISERROR(SEARCH(A1,B2));"B";"A")
"avgrin" skrev: IF(search(A1, B2)0,A,B) I'm searching for a string in A1 in the cell B2, if B2 contains A1, search() returns starting position of A1, and operation A is performed. However, when it is not there, #VALUE is returned. How do I get operation B? Thank you |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF() with #VALUE
Perhaps something like this:
=IF(COUNTIF(B1,"*"&A1&"*"),expr_A,expr_B) Is that something you can work with? -------------------------- Regards, Ron (XL2003, Win XP) Microsoft MVP (Excel) "avgrin" wrote in message ... IF(search(A1, B2)0,A,B) I'm searching for a string in A1 in the cell B2, if B2 contains A1, search() returns starting position of A1, and operation A is performed. However, when it is not there, #VALUE is returned. How do I get operation B? Thank you |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF() with #VALUE
ups
=IF(ISERROR(SEARCH(A1,B2)),"B","A") "excelent" skrev: =IF(ISERROR(SEARCH(A1,B2));"B";"A") "avgrin" skrev: IF(search(A1, B2)0,A,B) I'm searching for a string in A1 in the cell B2, if B2 contains A1, search() returns starting position of A1, and operation A is performed. However, when it is not there, #VALUE is returned. How do I get operation B? Thank you |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|