+ Reply to Thread
Results 1 to 10 of 10

Dynamic array formula to return nth occurrence

  1. #1
    Forum Contributor
    Join Date
    08-20-2011
    Location
    Oslo
    MS-Off Ver
    MS 365
    Posts
    245

    Dynamic array formula to return nth occurrence

    Hi,

    In the attached workbook I am trying to perform an INDEX/MATCH type calculation to return 1 ... nth occurrence into separate columns for these.

    How can this be done using dynamic array functions that yields a spill range for each (or one spill range for all)?

    Best regards,
    Marbleking
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Dynamic array formula to return nth occurrence

    Spill row for each:
    =TRANSPOSE(FILTER(Table1[Description_1],Table1[Date_1]=Table1[@[Date_2]]))
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Dynamic array formula to return nth occurrence

    Single cell spill array:

    =IFERROR(DROP(REDUCE("",Table1[Date_2],LAMBDA(a,b,VSTACK(a,TRANSPOSE(FILTER(Table1[Description_1],Table1[Date_1]=b))))),1),"")
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Dynamic array formula to return nth occurrence

    One formula for the lot
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Dynamic array formula to return nth occurrence

    Or for the fun of it
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Dynamic array formula to return nth occurrence

    Aha!! The penny drops. I had been mucking around with TEXTJOIN & TEXTSPLIT and couldn't get it working. NOW, I see how... row and column separators.

    As the Meerkats say: "simples".

    Hopefully, I'll get to grips with these array formulae eventually.

  7. #7
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Dynamic array formula to return nth occurrence

    Only problem with the textjoin is if the OP has too much data it will fail, as the string might get too large.

  8. #8
    Forum Contributor
    Join Date
    08-20-2011
    Location
    Oslo
    MS-Off Ver
    MS 365
    Posts
    245

    Re: Dynamic array formula to return nth occurrence

    Several alternatives, even! Thanks a lot!

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Dynamic array formula to return nth occurrence

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please click on "Thread Tools" from the menu link (just above the first post in the thread) and mark this thread as SOLVED.

  10. #10
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Dynamic array formula to return nth occurrence

    Glad to help & thanks for the feedback.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Need a formula to return an ARRAY prior to dynamic array functions - cannnot do it
    By RamJag in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-02-2022, 08:56 AM
  2. [SOLVED] COUNT Dynamic Array based on Date to return Dynamic Array Spill Range
    By dluhut in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-06-2022, 01:14 PM
  3. [SOLVED] Running Count/Occurrence of list using a dynamic array formula
    By Coley356 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-11-2022, 11:57 AM
  4. Need to return first occurrence of Job in array
    By Dawn Clark in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-30-2020, 11:00 PM
  5. [SOLVED] Return most recent occurrence in list based on multiple array criteria
    By Marbleking in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-05-2020, 03:37 PM
  6. Replies: 2
    Last Post: 02-06-2015, 11:23 AM
  7. return row for nth occurrence of text in array
    By Greg777 in forum Excel General
    Replies: 3
    Last Post: 11-03-2010, 12:37 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1