strip based on a range.

topi1

Board Regular
Joined
Aug 6, 2014
Messages
161
Office Version
  1. 2010
Book1
ABCDE
1Toyota Highlander is popularToyotaHighlander is poularMazda
2General Knowledge GeneralKnowledgeHonda
3Mercedes BenzMercedes BenzToyota
4Ford
5General Motors
Sheet3


Hi, In the above example, I have data in the Columns A and E. Is it possible to have formula in B1 and C1 to see if the first word in A1 matches with any word in the column E, and if it does, put that word in B1 and the rest of A1 string in C1. If there is no match in the column E, then B1=A1 and C1 is blank. As in the example.
Thank you in advance.
 
Intermittent gaps in column A shouldn't cause a zero unless you also have intermittent gaps in the column E data. Anyway, glad you got it sorted. This would be my small change to deal with that.

24 01 03.xlsm
ABCDE
1VariablesFormulaRange
2Today is ThursdayTHURSDAYSUNDAY
3Tomorrow is Friday MONDAY
4  TUESDAY
5Yesterday was Wednesday, a hump dayWEDNESDAY, A HUMP DAYWEDNESDAY, A HUMP DAY
6
7THURSDAY
Extract Text
Cell Formulas
RangeFormula
B2:B5B2=IFERROR(LOOKUP(9.99E+307,SEARCH(" "&$E$2:$E$7&" "," "&A2&" "),$E$2:$E$7)&"","")
Very nice. Works like a charm. Thanks.
 
Upvote 0

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
@Peter_SSs in the above example, is it possible to querry more than one column? In other words, what if we want to lookup in the columns, E,F,G and so on instead of column E only. Thank you.
 
Upvote 0
I think that would be a more difficult task with your excel version, but to consider it fully, could we have some new sample data and expected results with XL2BB?
 
Upvote 0
Will do. I am wondering if stacking all subsequent columns as one column in column E will do the trick.
 
Upvote 0

Forum statistics

Threads
1,215,327
Messages
6,124,280
Members
449,149
Latest member
mwdbActuary

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