Comparing cell value list separated by / but exclude a text within search using Formula

MHamid

Active Member
Joined
Jan 31, 2013
Messages
472
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Hello,

Need some advise on a formula I have created. I have a column with cells that have a list separated by " / " (All Businesses) that i have to compare to a list in a column on another sheet.
the Vital Business column in Sheet 1 is the desired result.
If I use the below formula, then I will see "Operational Effectiveness" as CTI and i don't want to see that (the reason why this is coming up as CTI is because one of the vital business is CTI and those letters are in the word Operational EffeCTIveness).
Excel Formula:
=TEXTJOIN(" / ",TRUE,IF(COUNTIF($F13,"*"&Admin!$A$2:$A$6&"*"),Admin!$A$2:$A$6,""))
My current workaround was to add a new column (BY) with the following formula:
Excel Formula:
=SUBSTITUTE($F12," / Operational Effectiveness","")

I tried to combine both formulas, but it doesn't even let me enter it as a valid formula.

anyone has any ideas how i can achieve what I need in one formula.


Sheet1:
Rich (BB code):
Excel file for Submission 
All BusinessesVital Business
ICG Operations / Operational Effectiveness
CAO / CISO / COO / CSS / CTI / GCB Operations / Operational EffectivenessCISO / CTI
GCB Operations / Operational Effectiveness

List in another sheet:
Rich (BB code):
Excel file for Submission 
CISO
CTI
GCB Technology
GFT
ICG Technology


Thank you,
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
I'm very hazy as to what you want, since I can't tell the actual cells where your data is, and what your exact requirements are. But maybe this might work for you:

Excel Formula:
=TEXTJOIN(" / ",TRUE,IF(ISNUMBER(SEARCH(" "&Admin!$A$2:$A$6&" "," "&$F13&" ")),Admin!$A$2:$A$6,""))
 
Upvote 0
Solution
I believe that Eric's solution is what you want, but for the future please you investigate XL2BB for providing sample data. If that is not possible then just copy/paste your small ranges from Excel into the forum, but do not use the vba tags for sample data as it it makes it hard for helpers to get that data into Excel to test with. :)
 
Upvote 0
Hello,

Peter - sure no problem. I can't use XL2BB due to work restrictions.

Eric - Your formula did the trick. Apologies for not providing the actual locations. I will explain better with column locations in the future.


Thank you both
 
Upvote 0
Peter - sure no problem. I can't use XL2BB due to work restrictions.
Fair enough. If you ask further questions it would be a good idea to state that in the first post or people like me will likely keep asking you for XL2BB samples. ;)

And just to confirm, if you just copy/paste from Excel like below and tell us what range is shown at least we can copy reasonably easily. :)

All BusinessesVital Business
ICG Operations / Operational Effectiveness
CAO / CISO / COO / CSS / CTI / GCB Operations / Operational EffectivenessCISO / CTI
GCB Operations / Operational Effectiveness
 
Upvote 0

Forum statistics

Threads
1,215,040
Messages
6,122,806
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