# Search for multiple words in range of cells...answer in adjacent cell

1. ## Search for multiple words in range of cells...answer in adjacent cell

Hi,

A) Search the data in column A for the words, TREAS, DFAS, DCD, PAY (There are more, but I assume I could add them later)

B) If the data in a cell in column A contains any of these words, put, "FED" in adjacent cell in B column. If the data does not contain any of those words, put, "Non-Fed", in adjacent cell in B column.

- Jim

2. ## Re: Search for multiple words in range of cells...answer in adjacent cell

Try this in B1 and copy down

=IF(ISNUMBER(SEARCH({"REAS","DFAS","DCD","PAY"},A1)),"FED","Non-Fed")

3. ## Re: Search for multiple words in range of cells...answer in adjacent cell

If you put those words in D1:D4, then in B1 and down,

=OR(ISNUMBER(SEARCH(" " & \$D\$1:\$D\$4 & " ", " " & A1 & " ")))

... confirmed with Ctrl+Shift+Enter.

You words are not well delimited in the text (i.e., not consistently separated by, for example, spaces), so the approach has limitations.

4. ## Re: Search for multiple words in range of cells...answer in adjacent cell

Thanks contaminated

It worked, but it only recognized the "REAS,"...all other cells were marked as, "Non-Fed."

5. ## Re: Search for multiple words in range of cells...answer in adjacent cell

shg thanks much...worked great!

6. ## Re: Search for multiple words in range of cells...answer in adjacent cell

Hi,

A) Search the data in column A for the words, TREAS, DFAS, DCD, PAY (There are more, but I assume I could add them later)

B) If the data in a cell in column A contains any one or two then return same values. If 2 value found return both with separated by coma.

7. ## Re: Search for multiple words in range of cells...answer in adjacent cell

krratna,

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1