Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Search Function
Hi,
Following function formula gives me a result like"Direct FundingsDirect Fundings". How can I modify the formula so that the result is "Direct Fundings" once instead of layers. I know my text string has both words "VAR" and "Intercompany" in it. =(IF(ISERROR(SEARCH("VAR",AC81)),"","Direct Fundings")&IF(ISERROR(SEARCH("Direct Funding",AC81)),"","Direct Fundings")&IF(ISERROR(SEARCH("Intercompany",AC81)) ,"","Direct Fundings") Thanks, Dinesh |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Search Function
You need to flip the logic around so it only answers one time, using the &
causes the function to repeat: =IF(ISERROR(SEARCH("VAR",E12)), IF(ISERROR(SEARCH("Direct Funding",E12)), IF(ISERROR(SEARCH("Intercompany",E12)), "","Direct Funding"),"Direct Funding"),"Direct Funding") That can DEFINITELY be shortened, but for now, that will work. -- "Actually, I *am* a rocket scientist." -- JB Your feedback is appreciated, click YES if this post helped you. "Dinesh" wrote: Hi, Following function formula gives me a result like"Direct FundingsDirect Fundings". How can I modify the formula so that the result is "Direct Fundings" once instead of layers. I know my text string has both words "VAR" and "Intercompany" in it. =(IF(ISERROR(SEARCH("VAR",AC81)),"","Direct Fundings")&IF(ISERROR(SEARCH("Direct Funding",AC81)),"","Direct Fundings")&IF(ISERROR(SEARCH("Intercompany",AC81)) ,"","Direct Fundings") Thanks, Dinesh |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Search Function
Try it like this:
=IF(OR(ISNUMBER(SEARCH({"VAR","Direct Funding","Intercompany"},AC81))),"Direct Fundings","") -- Biff Microsoft Excel MVP "Dinesh" wrote in message ... Hi, Following function formula gives me a result like"Direct FundingsDirect Fundings". How can I modify the formula so that the result is "Direct Fundings" once instead of layers. I know my text string has both words "VAR" and "Intercompany" in it. =(IF(ISERROR(SEARCH("VAR",AC81)),"","Direct Fundings")&IF(ISERROR(SEARCH("Direct Funding",AC81)),"","Direct Fundings")&IF(ISERROR(SEARCH("Intercompany",AC81)) ,"","Direct Fundings") Thanks, Dinesh |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Search Function
Another one that saves a couple of keystrokes:
=IF(SUM(COUNTIF(AC81,{"*VAR*","*Direct Funding*","*Intercompany*"})),"Direct Fundings","") -- Biff Microsoft Excel MVP "T. Valko" wrote in message ... Try it like this: =IF(OR(ISNUMBER(SEARCH({"VAR","Direct Funding","Intercompany"},AC81))),"Direct Fundings","") -- Biff Microsoft Excel MVP "Dinesh" wrote in message ... Hi, Following function formula gives me a result like"Direct FundingsDirect Fundings". How can I modify the formula so that the result is "Direct Fundings" once instead of layers. I know my text string has both words "VAR" and "Intercompany" in it. =(IF(ISERROR(SEARCH("VAR",AC81)),"","Direct Fundings")&IF(ISERROR(SEARCH("Direct Funding",AC81)),"","Direct Fundings")&IF(ISERROR(SEARCH("Intercompany",AC81)) ,"","Direct Fundings") Thanks, Dinesh |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Search Function
Heh, forgot the SEARCH portion that time...
-- "Actually, I *am* a rocket scientist." -- JB "T. Valko" wrote: Another one that saves a couple of keystrokes: =IF(SUM(COUNTIF(AC81,{"*VAR*","*Direct Funding*","*Intercompany*"})),"Direct Fundings","") |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Search Function
No, Biff's formula is correct as written... he used a different approach
that doesn't require the SEARCH function. Try the two formulas he posted out to see that they react the same. -- Rick (MVP - Excel) "JBeaucaire" wrote in message ... Heh, forgot the SEARCH portion that time... -- "Actually, I *am* a rocket scientist." -- JB "T. Valko" wrote: Another one that saves a couple of keystrokes: =IF(SUM(COUNTIF(AC81,{"*VAR*","*Direct Funding*","*Intercompany*"})),"Direct Fundings","") |
#7
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Search Function
Of course...those little wildcards blend into the quotes in this tiny little
forum font. good stuff! -- "Rick Rothstein" wrote: No, Biff's formula is correct as written... he used a different approach that doesn't require the SEARCH function. Try the two formulas he posted out to see that they react the same. |
#8
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Search Function
Ok, this is my final answer! <g
Saves a few more keystrokes: =IF(COUNT(SEARCH({"VAR","Direct Funding","Intercompany"},AC81)),"Direct Fundings","") -- Biff Microsoft Excel MVP "JBeaucaire" wrote in message ... Of course...those little wildcards blend into the quotes in this tiny little forum font. good stuff! -- "Rick Rothstein" wrote: No, Biff's formula is correct as written... he used a different approach that doesn't require the SEARCH function. Try the two formulas he posted out to see that they react the same. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Search Function | Excel Worksheet Functions | |||
SEARCH function help | Excel Worksheet Functions | |||
How do I add a search function? | New Users to Excel | |||
Search Function.. | New Users to Excel | |||
VBA Search function | Excel Discussion (Misc queries) |