ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Search Formula (https://www.excelbanter.com/excel-worksheet-functions/213539-search-formula.html)

Dinesh

Search Formula
 
The following formula do not work to capture the either of the test string. I
guess I am missing something here.

IF(ISERROR(SEARCH("Direct Fundings","direct funding",AA122)),"","Direct
Fundings")

Thanks to correct it.

Dinesh

Max

Search Formula
 
One alternative in this instance:
=IF(COUNTIF(AA122,"*direct funding*"),"Direct Fundings","")
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:21,000 Files:365 Subscribers:65
xdemechanik
---
"Dinesh" wrote:
The following formula do not work to capture the either of the test string. I
guess I am missing something here.

IF(ISERROR(SEARCH("Direct Fundings","direct funding",AA122)),"","Direct
Fundings")



Fred Smith[_4_]

Search Formula
 
What you are missing is the parameters which Search will accept. When you
enter a function into Excel, it will show you what parameters it will
accept. In the case of Search, there's three:
find_text, within_text, start-num

So you are asking Excel to find "Direct Fundings" within the string "direct
funding" starting at position aa122. This can't be done, so Excel returns an
error.

My guess is you want to find either "Direct Fundings" or "direct funding"
anywhere in AA122. If so, you only have to search for the latter, as it's a
subset of the former. So try:
IF(ISERROR(SEARCH("direct funding",AA122)),"","Direct Fundings")

Regards,
Fred


"Dinesh" wrote in message
...
The following formula do not work to capture the either of the test
string. I
guess I am missing something here.

IF(ISERROR(SEARCH("Direct Fundings","direct funding",AA122)),"","Direct
Fundings")

Thanks to correct it.

Dinesh



Dinesh

Search Formula
 
Thanks you Max & Fred. It works in both the cases.

"Fred Smith" wrote:

What you are missing is the parameters which Search will accept. When you
enter a function into Excel, it will show you what parameters it will
accept. In the case of Search, there's three:
find_text, within_text, start-num

So you are asking Excel to find "Direct Fundings" within the string "direct
funding" starting at position aa122. This can't be done, so Excel returns an
error.

My guess is you want to find either "Direct Fundings" or "direct funding"
anywhere in AA122. If so, you only have to search for the latter, as it's a
subset of the former. So try:
IF(ISERROR(SEARCH("direct funding",AA122)),"","Direct Fundings")

Regards,
Fred


"Dinesh" wrote in message
...
The following formula do not work to capture the either of the test
string. I
guess I am missing something here.

IF(ISERROR(SEARCH("Direct Fundings","direct funding",AA122)),"","Direct
Fundings")

Thanks to correct it.

Dinesh




Max

Search Formula
 
Welcome. Do me a favour?
Press the YES button in my response as well
Thanks
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:21,000 Files:365 Subscribers:65
xdemechanik
---
"Dinesh" wrote:
Thanks you Max & Fred. It works in both the cases.




All times are GMT +1. The time now is 04:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com