Excel Formula Help: Extract a Value If Cell Contains a Certain Text

aniysapulliam

New Member
Joined
Jun 19, 2020
Messages
4
Office Version
  1. 365
Hello all,

I am trying to create a formula to extract value names where someone 1) Opted In and the Name of the Category.

For example:
E01M01G0NS0N
E0NM1NG0NS0N

0 = Opted Out
1 = Opted In
E = Exchange
M = Membership
G = Getaway
S = Survey
N = No Change

So, in the first example it is saying: Exchange Opted Out then Opted In, Membership Opted Out then Opted In, Getaway Opted Out No Change, Survey Opted Out No Change.

Ultimately, I need a formula that will return the value Exchange, Membership for the first example (signifying the areas where someone Opted In)

For the second example it is saying: Exchange Opted Out No Change, Membership Opted In No Change, Getaway Opted Out No Change, Survey Opted Out No Change

The value would be Membership

Thank you.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
It's long and likely terribly inefficient, but this seems to work. Change A1 to whatever cell is relevant.

=CONCAT(IF(OR(MID(A1,2,2)="01",MID(A1,2,2)="1N"),"Exchange",""),IF(OR(MID(A1,5,2)="01",MID(A1,5,2)="1N"),IF(OR(MID(A1,2,2)="01",MID(A1,2,2)="1N"),", Membership","Membership"),""),IF(OR(MID(A1,8,2)="01",MID(A1,8,2)="1N"),IF(OR(MID(A1,2,2)="01",MID(A1,2,2)="1N",MID(A1,5,2)="01",MID(A1,5,2)="1N"),", Gateway","Gateway"),""),IF(OR(MID(A1,11,2)="01",MID(A1,11,2)="1N"),IF(OR(MID(A1,2,2)="01",MID(A1,2,2)="1N",MID(A1,5,2)="01",MID(A1,5,2)="1N",MID(A1,8,2)="01",MID(A1,8,2)="1N"),", Survey","Survey"),""))
 
Upvote 0

Forum statistics

Threads
1,214,923
Messages
6,122,289
Members
449,077
Latest member
Rkmenon

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