ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Searching for multiple strings and return multiple solutions (https://www.excelbanter.com/excel-worksheet-functions/113179-searching-multiple-strings-return-multiple-solutions.html)

Ron

Searching for multiple strings and return multiple solutions
 
I think I'm close in concept but may not be using the correct function.

This formula works except it returns only "Line" or a blank.
=IF(OR(ISNUMBER(SEARCH({"Line","Text","Point"},C[1]))),"Line","")

Searched data is column C, I need column B to return results as shown below.
B C
Line 000Default LineLineSymbology
Text 001Default TextTextSymbology
Point 002Default PointPointSymbology
Line 003Plan LineLineSymbology
'empty field'


Dave Peterson

Searching for multiple strings and return multiple solutions
 
Maybe...

=IF(ISNUMBER(SEARCH("line",C1)),"Line",
IF(ISNUMBER(SEARCH("point",C1)),"Point",
IF(ISNUMBER(SEARCH("text",C1)),"Text","")))



Ron wrote:

I think I'm close in concept but may not be using the correct function.

This formula works except it returns only "Line" or a blank.
=IF(OR(ISNUMBER(SEARCH({"Line","Text","Point"},C[1]))),"Line","")

Searched data is column C, I need column B to return results as shown below.
B C
Line 000Default LineLineSymbology
Text 001Default TextTextSymbology
Point 002Default PointPointSymbology
Line 003Plan LineLineSymbology
'empty field'


--

Dave Peterson

Ron

Searching for multiple strings and return multiple solutions
 
Dave,
Your the man!
Thanks!

"Dave Peterson" wrote:

Maybe...

=IF(ISNUMBER(SEARCH("line",C1)),"Line",
IF(ISNUMBER(SEARCH("point",C1)),"Point",
IF(ISNUMBER(SEARCH("text",C1)),"Text","")))



Ron wrote:

I think I'm close in concept but may not be using the correct function.

This formula works except it returns only "Line" or a blank.
=IF(OR(ISNUMBER(SEARCH({"Line","Text","Point"},C[1]))),"Line","")

Searched data is column C, I need column B to return results as shown below.
B C
Line 000Default LineLineSymbology
Text 001Default TextTextSymbology
Point 002Default PointPointSymbology
Line 003Plan LineLineSymbology
'empty field'


--

Dave Peterson



All times are GMT +1. The time now is 08:11 PM.

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