+ Reply to Thread
Results 1 to 3 of 3

Finding 2nd to last match in a column

  1. #1
    Registered User
    Join Date
    01-31-2010
    Location
    Missoula, MT
    MS-Off Ver
    Excel 2007
    Posts
    15

    Finding 2nd to last match in a column

    I have a formula that I use in a sales spreadsheet to find the last time a customer made a purchase-

    =LOOKUP(2,1/(C1:C25=D50),F1:F25)

    Where D50 is the customer number, column C contains customer numbers and F contains the sales amounts. Column C does contain blanks.

    It works perfectly.

    I now have a need to find the 2nd to last sales amount for customers. Searching online gives me formulas to find the 2nd to last item but I am having trouble converting that to finding second to last match. Like this array formula:

    =INDEX(B:B,LARGE(IF(B:B<>"",ROW(B:B)),2))

    Anyone know how I can accomplish this?

    Mark

  2. #2
    Forum Contributor
    Join Date
    04-19-2015
    Location
    pakistan
    MS-Off Ver
    2013
    Posts
    335

    Re: Finding 2nd to last match in a column

    try, to find 2nd last value>>set ranges =INDEX(F1:F21,AGGREGATE(14,6,ROW(F1:F21)/(C1:C21=H2),2))

    Gondal

  3. #3
    Registered User
    Join Date
    01-31-2010
    Location
    Missoula, MT
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Finding 2nd to last match in a column

    Actually I found another way to do it after I posted the question-

    =LARGE(IF(criteria,ROW(rng)-MIN(ROW(rng))+1),k)

    Where k is the "nth largest", this returns the row number so I added an INDEX to retrieve the value.

    So my formula is adapted to-

    =INDEX(F1:F25,LARGE(IF(C1:C25=D50,ROW(C1:C25)-MIN(ROW(C1:C25))+1),2))

    It works on a test spreadsheet, now I will try to incorporate it into my work.

    Thanks anyway!

+ 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] Finding last column of match value in range
    By yuvalmoshe in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-06-2020, 06:44 PM
  2. Finding if two different cells match down in a column
    By john.burns in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-27-2018, 01:52 PM
  3. [SOLVED] Finding the last column using MATCH
    By L.LEE in forum Excel General
    Replies: 5
    Last Post: 01-08-2017, 01:25 PM
  4. [SOLVED] Finding intersection value of specific row and column that match a certain value
    By Nikox9 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-20-2016, 02:48 AM
  5. [SOLVED] Finding a partial match within a column
    By kestefon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-14-2013, 02:14 PM
  6. [SOLVED] Finding a match in part of a column
    By j_Southern in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-10-2013, 07:42 AM
  7. Replies: 4
    Last Post: 02-19-2013, 02:19 PM

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