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

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
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,215,035
Messages
6,122,785
Members
449,095
Latest member
m_smith_solihull

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