![]() |
How to use the search in an if statement
I have a spreadsheet with numbers in column B and letters in column C. I
need to search for "J" in Column C and if there is not a J there and there is a number 0 in Column B, I need to put a "B" in Column D. I figured out the search function, but when there is not a J, I am just getting an error, what formula should can I use? |
How to use the search in an if statement
Hi
Use the formula below: =IF(ISERROR(SEARCH("j",C5,1))=TRUE,0,IF(B50,"B",0 )) For the ones that there are not "J", the formula returns 0,if there is J but the number is less than 0, then also returns 0 Click yes if helped -- Greatly appreciated Eva "trinamariem" wrote: I have a spreadsheet with numbers in column B and letters in column C. I need to search for "J" in Column C and if there is not a J there and there is a number 0 in Column B, I need to put a "B" in Column D. I figured out the search function, but when there is not a J, I am just getting an error, what formula should can I use? |
How to use the search in an if statement
I put that into my spreadsheet and its not working for me. I updated the
cell references to my actual cells and changed the 0 to "". My column B is 56, Column C is D1 and the result is 0 when I would expect a B. I did the formula auditing so I could try to understand what was happening and it shows me this: IF(ISERROR(SEARCH("J',C12,1))=TRUE,"",IF(B120,"B" ,"")) IF(ISERROR(SEARCH("J',"D1",1))=TRUE,"",IF(B120,"B ","")) IF(ISERROR(#VALUE!)=TRUE,"",IF(B120,"B","")) IF(TRUE=TRUE,"",IF(B120,"B","")) IF(TRUE,"",IF(B120,"B","")) then it goes to blank "Eva" wrote: Hi Use the formula below: =IF(ISERROR(SEARCH("j",C5,1))=TRUE,0,IF(B50,"B",0 )) For the ones that there are not "J", the formula returns 0,if there is J but the number is less than 0, then also returns 0 Click yes if helped -- Greatly appreciated Eva "trinamariem" wrote: I have a spreadsheet with numbers in column B and letters in column C. I need to search for "J" in Column C and if there is not a J there and there is a number 0 in Column B, I need to put a "B" in Column D. I figured out the search function, but when there is not a J, I am just getting an error, what formula should can I use? |
How to use the search in an if statement
Nevermind, I figured it out, thanks for your help
"trinamariem" wrote: I put that into my spreadsheet and its not working for me. I updated the cell references to my actual cells and changed the 0 to "". My column B is 56, Column C is D1 and the result is 0 when I would expect a B. I did the formula auditing so I could try to understand what was happening and it shows me this: IF(ISERROR(SEARCH("J',C12,1))=TRUE,"",IF(B120,"B" ,"")) IF(ISERROR(SEARCH("J',"D1",1))=TRUE,"",IF(B120,"B ","")) IF(ISERROR(#VALUE!)=TRUE,"",IF(B120,"B","")) IF(TRUE=TRUE,"",IF(B120,"B","")) IF(TRUE,"",IF(B120,"B","")) then it goes to blank "Eva" wrote: Hi Use the formula below: =IF(ISERROR(SEARCH("j",C5,1))=TRUE,0,IF(B50,"B",0 )) For the ones that there are not "J", the formula returns 0,if there is J but the number is less than 0, then also returns 0 Click yes if helped -- Greatly appreciated Eva "trinamariem" wrote: I have a spreadsheet with numbers in column B and letters in column C. I need to search for "J" in Column C and if there is not a J there and there is a number 0 in Column B, I need to put a "B" in Column D. I figured out the search function, but when there is not a J, I am just getting an error, what formula should can I use? |
All times are GMT +1. The time now is 10:26 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com