Cell contain multiple text

Shahuru

New Member
Joined
Dec 4, 2018
Messages
11
Office Version
  1. 2016
Platform
  1. Windows
Hi I need assistance to build a formula for the below scenario,

BB,DN = HB

BB,DN,LN = FB

If cell A1 contains " BB,DN " I want the result to go B1 as " HB" and if cell A1 contains " BB,DN,LN" results to be in B1 as "FB"


[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][TABLE="width: 500"]
<tbody>[TR]
[TD]BB,DN,LN,
[/TD]
[TD]FB
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]BB,DN
[/TD]
[TD]HB
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Ok, how about
=IF(SUMPRODUCT(COUNTIF(A1,{"*LN*","*DN*","*BB*","*WN*","*LQ*","*BR*"}))=6,"AI",IF(SUMPRODUCT(COUNTIF(A1,{"*LN*","*DN*","*BB*"}))=3,"FB",IF(SUMPRODUCT(COUNTIF(A1,{"*DN*","*BB*"}))=2,"HB","")))
 
Upvote 0

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Forum statistics

Threads
1,223,893
Messages
6,175,240
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