XLOOKUP to find Nth occurrence

ollyhughes1982

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

I have the below worksheet (below), in which I have a working solution for the first table (‘MY parkruns - ALL COMPLETED RUNS - STOPWATCH BINGO #1’). This first table identifies the first Event (Venue) where times ending from '00' to '59' (the seconds digits - column A) were achieved.

Screenshot 2023-09-14 at 09.51.21.jpg


This works fine and has no issues. Formulas below:

Column B:
=IFERROR(XLOOKUP(A4,TEXT(RIGHT('All Completed Runs'!$AN$4:$AN$2003,2),"00"),'All Completed Runs'!$C$4:$C$2003,""),"")

Column C:
=IFERROR(XLOOKUP(A4,TEXT(RIGHT('All Completed Runs'!$AN$4:$AN$2003,2),"00"),'All Completed Runs'!$Z$4:$Z$2003,""),"")

Column D:
=IFERROR(XLOOKUP(A4,TEXT(RIGHT('All Completed Runs'!$AN$4:$AN$2003,2),"00"),'All Completed Runs'!$E$4:$E$2003,""),"")

Column E:
=IFERROR(IF(B4="","",COUNTIF('All Completed Runs'!$AN$4:$AN$2003,A4)),"")

My problem, is that I would now like to find the second instance of each '00' to '59' achieved (‘MY parkruns - ALL COMPLETED RUNS - STOPWATCH BINGO #2’), third (‘MY parkruns - ALL COMPLETED RUNS - STOPWATCH BINGO #3’), fourth (‘MY parkruns - ALL COMPLETED RUNS - STOPWATCH BINGO #4’) and so on - up to ten. I haven’t been able to achieve this, despite trying a number of things including the SEQUENCE function, but just can’t seem to get it to work.

Workbook can be found here (One Drive - small file and opens easily): All Completed Runs.xlsx

Thanks in advance!

Olly.
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
How about
for H4
Excel Formula:
=IFERROR(TAKE(DROP(FILTER(CHOOSECOLS('All Completed Runs'!$C$4:$Z$2003,1,-1,3),'All Completed Runs'!$AN$4:$AN$2003=A4),1),1),"")
and N4
Excel Formula:
=IFERROR(TAKE(DROP(FILTER(CHOOSECOLS('All Completed Runs'!$C$4:$Z$2003,1,-1,3),'All Completed Runs'!$AN$4:$AN$2003=A4),2),1),"")
 
Upvote 1
Solution
How about
for H4
Excel Formula:
=IFERROR(TAKE(DROP(FILTER(CHOOSECOLS('All Completed Runs'!$C$4:$Z$2003,1,-1,3),'All Completed Runs'!$AN$4:$AN$2003=A4),1),1),"")
and N4
Excel Formula:
=IFERROR(TAKE(DROP(FILTER(CHOOSECOLS('All Completed Runs'!$C$4:$Z$2003,1,-1,3),'All Completed Runs'!$AN$4:$AN$2003=A4),2),1),"")
Yes, that works perfectly. Brilliant, as always. Thanks so much!
 
Upvote 0

Forum statistics

Threads
1,215,068
Messages
6,122,950
Members
449,095
Latest member
nmaske

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