IF + OR formula

amp7394

New Member
Joined
Nov 16, 2018
Messages
8
What would be the correct formula for IF a cell contains text x OR contains text Y, then give me Z value. Right now I have:

=IF(SUM(COUNTIF(A6,{"BSC-NCORP-A","BSC-CORP-A"})),"BSC","CIG")

But I am only getting the CIG value for everything.
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Hi, I think below should work:


Book1
AB
5BSC-NCORP-ABSC
6BSC-NCORP-BBSC
7BSC-NCORP-CCIG
Sheet4
Cell Formulas
RangeFormula
B5=IF(OR(A5="BSC-NCORP-A",A5="BSC-NCORP-B"),"BSC","CIG")
 
Upvote 0
Hi, thank you for your response. I am actually only asking Excel to look for a portion of the cell. The entire A5 cell says: [TABLE="width: 389"]
<tbody>[TR]
[TD="width: 389"]BSC-NCORP-A|PLT-NA-NA|CIG-NA-NA|GLD-NCORP-L

So, IF A5 contains BSC-NCORP-A or BSC-CORP-A, then BSC, if not CIG.

How would I edit the formula so that its only asking to look portion of text in the cell?[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,223,892
Messages
6,175,236
Members
452,621
Latest member
Laura_PinksBTHFT

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