Advanced Lookup Help

ryansm05

Board Regular
Joined
Sep 14, 2016
Messages
148
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I have a pretty complex look-up issue and wondered if anyone can help? The link to the G-sheet and criteria are below (also within the G-sheet):

Link:
Criteria

1) Look down column B in DATA TAB and match with row 3 in TARGET TAB
2) Look down column C AND D in DATA TAB and return result that matches with TEAM in column B in TARGET TAB
3) If match is found in column C DATA TAB then add "(A)" to result
4) If result is found in column D DATA TAB then add "(H)" to result
5) if there are multiple matches, then separate these with a comma (see E7 & E8 in TARGET TAB)
6) if there are duplicate entries (row 5 & 15 in DATA TAB) then ignore

If anyone could help it would be massively appreciated.

Happy for this to be solved in Excel.

Thanks in advance
Ryan
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Do you need this to work in Excel or Google sheets?

Common methods for complex lookups in excel will not work with google sheets.
 
Upvote 0
Hi Jason,

Preferably in Google Sheets ... but if that's not possible, it'd still be very helpful to solve this in Excel.

Cheers
Ryan
 
Upvote 0
Using the dynamic array functions which require an up to date version of office 365 (Excel). This may be translatable to google sheets, I'm not familiar with the functions that it has available.

For older versions of excel, I don't see that it would be possible with a formula, likewise for google sheets if it does not have the functions used or an extremely close equivalent.

Note that the cell in yellow contains the correct results, but the order is slightly different. The formula reads by column rather than by row which you appear to have done, I don't see any way that it can be done in the same order as your example.
Cell Formulas
RangeFormula
C4:E13C4=LET(h,UNIQUE(FILTER(Data!$C$4:$C$21,(Data!$B$4:$B$21=C$3)*(Data!$D$4:$D$21=$B4),"")),a,UNIQUE(FILTER(Data!$D$4:$D$21,(Data!$B$4:$B$21=C$3)*(Data!$C$4:$C$21=$B4),"")),TEXTJOIN(", ",1,IF(h="","",h&" (H)"),IF(a="","",a&" (A)")))
 
Upvote 0
Solution
Thanks for your suggestion Jason.

There is an insane amount of knowledge within that formula - but unfortunately for me, it did not work on either Excel nor Google Sheets.

I'm going to have a re-think about how I can do this differently but will mark the thread as a solution solved.

Regards
Ryan
 
Upvote 0
If you update your profile to show which version of excel you're using then I'll have another look at it for you (click your user name at the top right, then Account Details. Scroll down and tick the version box, then save changes at the bottom).

I haven't tried alternatives yet, but at a glance I think something might be possible although multiple entries and duplicates are looking like some big hurdles.
In the case of multiple matches, would it be a maximum of 2? If not what would be the highest?
 
Upvote 0

Forum statistics

Threads
1,214,924
Messages
6,122,293
Members
449,077
Latest member
Rkmenon

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