Contains condition with multiple IF/OR

Balajibenz

Board Regular
Joined
Nov 18, 2020
Messages
80
Office Version
  1. 2013
Platform
  1. Windows
Hi Can someone help me with below with formula or VBA code.

I have string in column T and I need below to be done in column AK.

If string in column T contains 07X OR 18X then publish Yes in "AK". If column "T" has 08X OR 04X OR 07A the publish NO in "AK". else publish as Others. Thank you in advance.

07X,18X - Yes
08X,04X,07A - NO
Remaining - Others
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Hello,

Try this formula, paste on cell "AK1": =IF(ISNUMBER(FIND("07X",T1,1)),"YES",IF(ISNUMBER(FIND("18X",T1,1)),"YES",IF(ISNUMBER(FIND("08X",T1,1)),"NO",IF(ISNUMBER(FIND("04X",T1,1)),"NO",IF(ISNUMBER(FIND("07A",T1,1)),"NO","OTHERS")))))
 
Upvote 0
If you wanted one a bit shorter try
Excel Formula:
=IF(COUNT(SEARCH({"07X","18X"},T2)),"YES",IF(COUNT(SEARCH({"08X","04X","07A"},T2)),"NO","OTHERS"))
With your version of Excel you may need to confirm the formula with Ctrl+Shift+Enter, not just Enter
 
Upvote 0
Solution

Forum statistics

Threads
1,223,714
Messages
6,174,052
Members
452,542
Latest member
Bricklin

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