Results 1 to 3 of 3

Thread: Fetch Nth last item from a list

  1. #1
    Junior Member SDruley's Avatar
    Join Date
    Nov 2012
    Posts
    23
    Rep Power
    0

    Fetch Nth last item from a list

    Rick, regarding your famous equation...

    Code:
    =LOOKUP(2,1/(CG5:CG1540<>""),CG5:CG1540)
    How can i modify it to tell me what the second and third to the last items are in the given column?

    Steve

  2. #2
    Forum Guru Rick Rothstein's Avatar
    Join Date
    Feb 2012
    Posts
    662
    Rep Power
    13
    Quote Originally Posted by SDruley View Post
    Rick, regarding your famous equation...

    Code:
    =LOOKUP(2,1/(CG5:CG1540<>""),CG5:CG1540)
    How can i modify it to tell me what the second and third to the last items are in the given column?

    Steve
    I don't think that formula can be modified to do that; however, you should be able to use this formula where you would specify the number of the item you want (1 for last, 2 for next-to-last, 3 for third-from-last, etc.) where I have highlighted in red...

    =INDEX(CG1:CG1540,SUMPRODUCT(LARGE((CG5:CG1540<>"" )*ROW(CG5:CG1540),3)))

  3. #3
    Junior Member SDruley's Avatar
    Join Date
    Nov 2012
    Posts
    23
    Rep Power
    0
    Quote Originally Posted by Rick Rothstein View Post
    I don't think that formula can be modified to do that; however, you should be able to use this formula where you would specify the number of the item you want (1 for last, 2 for next-to-last, 3 for third-from-last, etc.) where I have highlighted in red...

    =INDEX(CG1:CG1540,SUMPRODUCT(LARGE((CG5:CG1540<>"" )*ROW(CG5:CG1540),3)))
    WOW. This is wonderful

    Steve

Similar Threads

  1. Nth Such-And-Such Day Of The Month
    By Rick Rothstein in forum Rick Rothstein's Corner
    Replies: 6
    Last Post: 01-02-2020, 06:48 PM
  2. Nth Day Of Week Number Using Formula
    By paul_pearson in forum Excel Help
    Replies: 2
    Last Post: 06-16-2013, 06:40 PM
  3. Nth Working Day Including Saturday
    By Excel Fox in forum Download Center
    Replies: 0
    Last Post: 10-10-2012, 02:41 AM
  4. Fetch multiple values based on criteria
    By Lucero in forum Excel Help
    Replies: 8
    Last Post: 04-07-2012, 12:35 PM
  5. Replies: 7
    Last Post: 03-06-2012, 07:49 AM

Posting Permissions

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