INDEX and MATCH formula

greevek

New Member
Joined
Mar 15, 2017
Messages
8
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
  3. Mobile
  4. Web
It's been some time since I have needed to write more complex formulas and I am struggling, can anyone help with the below:

I am trying to put a formula together that looks up and compares data in two columns and returns the wording from one if it matches/partially matches the wording in the other column.
So far it is kind of working but it's not returning all of the data when I know it should be returning a match, I think I need to include EXACT somewhere in my formula so that it looks at case sensitive matches but I cannot figure out what to do.

Any help, guidance or alternative options will be greatly received.

Book.xlsx
BEJ
1advert_identifiercompanynameColumn3
2RSM BEARESRSM BEARESRSM BEARES
3INTERIORSLIFE HOUSE ACCOUNTNEW HOMES MAG
4USED LISTINGBrandon Car Centre -MG#N/A
5FUW INSURANCEFUW Insurance ServicesFUW INSURANCE
6BULLARDSBullards Spirits LtdBULLARDS
7NNGM NFKNorth Norfolk Garden Machinery#N/A
8BURE VALLEY RAILWAYBure Valley Railway (1991) LtdBURE VALLEY RAILWAY
9ABBEYGATE LIGHTINGRush Lighting Ltd#N/A
10NORFOLK GARDEN MACNorth Norfolk Garden MachineryNNGM NFK
11NORFOLK GARDEN MACNorth Norfolk Garden MachineryNNGM NFK
12DISS CARSDiss Car Centre#N/A
13NORFOLK GARDEN MACNorth Norfolk Garden MachineryNNGM NFK
14DREAM DOORSDREAM DOORS HUNTINGDONDREAM DOORS
15NORFOLK GARDEN MACNorth Norfolk Garden MachineryNNGM NFK
16A W MYHILLSA W Myhill & Son#N/A
17HARTINGTON CHEESEHartington Cheese ShopHARTINGTON CHEESE
18LACY SCOTT & KNIGHTLacy Scott & Knight ( Fine Art A/C )LACY SCOTT & KNIGHT
19WINCER K - HAD HALFWincer Kievenaar LLP#N/A
20QC61135Suffolk County Council#N/A
21ROLEX / WHITTLESWhittles Jewellers#N/A
22QC61134Suffolk County Council#N/A
23GIANT BOOTSALE FRIDAtony sheen#N/A
24WINCER K - HAD FPWincer Kievenaar LLP#N/A
25GTI ROOFING - GORGTI Roofing#N/A
26HEALTH & MOBILITYhealth & mobilityHEALTH & MOBILITY
27NEW HOMES MAGNordikka Interiors Ltd#N/A
28CARS WANTEDIpswich Road Service Station#N/A
29KJ CUSTOM KITCHENSKJ Custom Outdoor Kitchens Ltd#N/A
30ROARR! - NSTARoarr! Dinosaur Adventure#N/A
All Data
Cell Formulas
RangeFormula
J2:J30J2=INDEX($B$2:$E$4001,MATCH("*"&B2&"*",$E$2:$E$4001,0),1)
 
Thanks for updating your profile. (y)

Can you offer any help as to how I can achieve what I have asked?
What you have asked is not clear.

Adding to what steve the fish has already said ..
Your current formula, using "*"&B2&"*", is checking for the whole of each column B value within column E values.
For example, "BULLARDS" (cell B6) is found within "Bullards Spirits Ltd" (E6) and hence "BULLARDS" is returned as a result.

"NORFOLK GARDEN MAC" (B10) is first found in "North Norfolk Garden Machinery" (E8) and so "NNGM NFK" (B8) is returned, being the corresponding value to that first match.
Is that what you wanted for "NORFOLK GARDEN MAC" or did you want "NORFOLK GARDEN MAC" returned?

If you want to search for every individual word in column B (eg "Wincer") then I think you will have further problems as Excel will see words as those groups of characters separated by spaces. That would make, for example, both "A" and "W" from cell B16 words to search for and "A" will be found in lots of cells in column e (eg in E2 "RSM BEARERS"

So, can you clarify better in words exactly what you are trying to do?
And, instead of showing us the results of a formula that is not doing what you want, show us exactly what results you do want from that sample data in columns B & E by entering them manually in column J and posting that with explanation about how you got those results manually.
 
Upvote 0

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Thanks for updating your profile. (y)


What you have asked is not clear.

Adding to what steve the fish has already said ..
Your current formula, using "*"&B2&"*", is checking for the whole of each column B value within column E values.
For example, "BULLARDS" (cell B6) is found within "Bullards Spirits Ltd" (E6) and hence "BULLARDS" is returned as a result.

"NORFOLK GARDEN MAC" (B10) is first found in "North Norfolk Garden Machinery" (E8) and so "NNGM NFK" (B8) is returned, being the corresponding value to that first match.
Is that what you wanted for "NORFOLK GARDEN MAC" or did you want "NORFOLK GARDEN MAC" returned?

If you want to search for every individual word in column B (eg "Wincer") then I think you will have further problems as Excel will see words as those groups of characters separated by spaces. That would make, for example, both "A" and "W" from cell B16 words to search for and "A" will be found in lots of cells in column e (eg in E2 "RSM BEARERS"

So, can you clarify better in words exactly what you are trying to do?
And, instead of showing us the results of a formula that is not doing what you want, show us exactly what results you do want from that sample data in columns B & E by entering them manually in column J and posting that with explanation about how you got those results manually.
Thank you for coming back to me, I think what I thought might be a quick formula option to highlight the data is turning out to be a much bigger job and more work than I thought. It was supposed to be a data extraction to highlight where the ad identifier contained the full or partial company name as it shouldn't be used in that way but I think at a glance we can see this for ourselves.
Thank you both for your help but I am going to close this thread.
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,432
Members
448,961
Latest member
nzskater

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