Multiple IF(ISNUMBER(SEARCH( STATEMENT

YOURBLINGADDICTION

New Member
Joined
Dec 11, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
I have a spreadsheet that I am working on that I need to check for a specific set of letters and return the color that corresponds with those letters. there are about 20 different variations. I do not have a problem with the formula if it is only one that it is looking for. When I add the second one it does nothing at all. I am sure I am missing something very small but I have been looking at this for so long I do not see anything at all. Can anyone help me? The string that I am looking of is in all caps.
Here is the formula that works: =IF(ISNUMBER(SEARCH("BKXX",A20)),"BLACK", "")

This is where it falls apart: =IF(ISNUMBER(SEARCH("BKXX",A20)),"BLACK",IF(ISNUMBER(SEARCH("BLXX",A20))"BLUE",""))

Thank you all in advance.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Hi & welcome to MrExcel.
You are missing a comma before blue, try
Excel Formula:
=IF(ISNUMBER(SEARCH("BKXX",A20)),"BLACK",IF(ISNUMBER(SEARCH("BLXX",A20)),"BLUE",""))
 
Upvote 0

Forum statistics

Threads
1,215,097
Messages
6,123,079
Members
449,094
Latest member
mystic19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top