Limit filter list to unique values

ollyhughes1982

Well-known Member
Joined
Nov 27, 2018
Messages
745
Office Version
  1. 365
Platform
  1. MacOS
Hi,

In the image (and file - link at the bottom) you can see a worksheet called ‘All Completed Runs - Period’, where I attempt to complete the periodic table of elements, with the event (venue) names of parkruns that I have attended. You can see the criteria / logic for this in A2.

Screenshot 2024-02-29 at 13.43.53.jpeg


I currently have the following formula in K4, which I have filled down to the bottom of the range (K121):

Excel Formula:
=IF(A4<>"",XLOOKUP(IF(LEN(B4)=2,(INDEX(FILTER('All Completed Runs'!$BX$4:$BX$2003,('All Completed Runs'!$AS$4:$AS$2003=MID(B4,1,1))*(ISNUMBER(SEARCH(MID(B4,2,1),'All Completed Runs'!$GP$4:$GP$2003))),""),1)),INDEX(FILTER('All Completed Runs'!$BX$4:$BX$2003,'All Completed Runs'!$AS$4:$AS$2003=(MID(B4,1,1)),""),1)),'All Completed Runs'!$BX$4:$BX$2003,'All Completed Runs'!$C$4:$C$2003),"")

This works / worked perfectly up until now. However, I am now looking to add an extra complication; to only be able to use each parkrun event (venue) once in the list. I have tried various things, but I’ve been unable to achieve this. Please could anyone advise a way I could achieve this?

When assigning the parkrun event (venue) to the element, I would like to apply the earliest (by date that event was run at for the first time) to the earliest element in the table, from top down to the bottom.

e.g. In my data, Hereford parkrun (attended on 06/07/2019) would be selected for for Hydrogen, but not for Helium, as that is lower down the list. Helium should use Haverford West parkrun, as that was attended the next earliest from my list of parkruns (attended on 08/02/2020).

e.g. 2. In my data, Newport parkrun (attended on 11/04/2011) would be selected for Nitrogen, but not for Neon, as that is lower down the list. Helium should use Newent parkrun, as that was attended the next earliest from my list of parkruns (attended on 02/11/2019).

e.g. 3. In my data, Riverfront parkrun (attended on 21/10/2017) would be selected for Rhenium, but not for Radon, as that is lower down the list. Radon should use Ross-on-Wye parkrun, as that was attended the next earliest from my list of parkruns (attended on 03/08/2019).

Link to small file here: Periodic Table Example.xlsx

Thanks in advance,

Olly.
 
This has been up for a while now and haven't been able to find a solution. I will give up on this one. Thanks, everyone, for trying.
 
Upvote 0

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Please don't mark a post as a solution if it doesn't contain an answer.

I've only just seen this question, but it seems to me that your issue with formulas is going to be that you need to consider all of the matches for a given letter with all of the matches for elements starting with that letter. To give a simple example, the elements for O are Oxygen, Osmium, and Oganesson. Your 'O' parkruns are Oxford, Old Deer, Örebro (I assume you include this) and Oaklands. Oaklands would match both Oxygen and Osmium but if you used it for Oxygen, you remove the only possible match for Osmium, so you are one down on possible matches you could have made. At the very least any formula approach is going to need to start by considering 2 letter matches first, and ideally at least prioritise elements that only have one match. Even that won't be fool-proof - I suspect you'd need a recursive lambda or code to be 100% sure - but I think it would probably be close.
 
Upvote 0
Please don't mark a post as a solution if it doesn't contain an answer.

I've only just seen this question, but it seems to me that your issue with formulas is going to be that you need to consider all of the matches for a given letter with all of the matches for elements starting with that letter. To give a simple example, the elements for O are Oxygen, Osmium, and Oganesson. Your 'O' parkruns are Oxford, Old Deer, Örebro (I assume you include this) and Oaklands. Oaklands would match both Oxygen and Osmium but if you used it for Oxygen, you remove the only possible match for Osmium, so you are one down on possible matches you could have made. At the very least any formula approach is going to need to start by considering 2 letter matches first, and ideally at least prioritise elements that only have one match. Even that won't be fool-proof - I suspect you'd need a recursive lambda or code to be 100% sure - but I think it would probably be close.
Hi. Yes, thank you, you are understanding what I am after. I have spoken to the developers who have done it in their code (which they won’t divulge to me - which is fair enough, as they’ve put the work in to solve the problem) and they believe it not possible to do in Excel. However, they may not be aware of these latest recursive Lamda functions. What you’re saying is dead on, it’s like it needs to loop back over and amend entries if that entry is required for another entry and this entry can be filled by another. It’s very difficult and beyond my skills. If you have any ideas on how to do it, that would be brilliant, or anyone who might. Thanks.
 
Upvote 0
Hello,

I have worked on the file and created a check sheet for cross checking the details and found that the manual inputs are not always correct. Can you look at the updated file.

Have uploaded the file on wetransfer. Periodic Table
 
Upvote 0
Hello,

I have worked on the file and created a check sheet for cross checking the details and found that the manual inputs are not always correct. Can you look at the updated file.

Have uploaded the file on wetransfer. Periodic Table
I don't have wetransfer, I'm afraid. The manual entries might differ, there ar often multiple that can satisfy one entry
 
Upvote 0
Hi Fluff,

I have already uploaded the file on WeTransfer and shared the link in my previous post for anyone to download. I have created a check sheet in the file for ollyhughes1982 to verify the manual inputs which were there in his file.

Hope I have replied to your message. Please let me know, how else I can upload the file.

ollyhughes1982, you don't need to have a WeTransfer account. You can simply click the link and download the file.
 
Upvote 0
Please let me know, how else I can upload the file.
You can use the XL2BB add-in. Files hosted on share sites do not normally stay for long, so we need to see what you have done.
 
Upvote 0
I'm aware about XL2BB and have used it lot of times here, but there is so much data in the file that it will be difficult to upload using Xl2BB.
 
Upvote 0
All you need to do is post what you have done for the check sheet.
 
Upvote 0

Forum statistics

Threads
1,221,525
Messages
6,160,326
Members
451,637
Latest member
hvp2262

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