+ Reply to Thread
Results 1 to 7 of 7

Find the last-row result of multiple matches?

Hybrid View

goodiein2808 Find the last-row result of... 07-08-2011, 05:26 AM
DonkeyOte Re: Find the last-row result... 07-08-2011, 06:43 AM
snb Re: Find the last-row result... 07-08-2011, 07:10 AM
DonkeyOte Re: Find the last-row result... 07-08-2011, 07:58 AM
snb Re: Find the last-row result... 07-08-2011, 08:51 AM
daddylonglegs Re: Find the last-row result... 07-08-2011, 11:13 AM
snb Re: Find the last-row result... 07-08-2011, 11:53 AM
  1. #1
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Find the last-row result of multiple matches?

    @snb, yes, I think that is similar to OP's original formula (MAX rather than LARGE), however, you need to adjust either your use of ROW or initial INDEX range - as is you are offsetting by 1 row.

  2. #2
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Find the last-row result of multiple matches?

    @DO

    Sure !
    I amended the code. (I overlooked that because I tested on my system using F1:F3000).



  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,696

    Re: Find the last-row result of multiple matches?

    Quote Originally Posted by DonkeyOte View Post
    @snb, yes, I think that is similar to OP's original formula (MAX rather than LARGE),.......
    There is a difference, though, if there are no rows that meet the criteria. MAX will return zero and LARGE will return an error. The former is a problem because when the zero is fed to the INDEX function the whole column is returned. Here because only a single value can be returned by the formula that manifests itself as the contents of G2 - hence an erroneous result.......better to get the error with LARGE.......
    Last edited by daddylonglegs; 07-08-2011 at 11:30 AM.
    Audere est facere

  4. #4
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Find the last-row result of multiple matches?

    wouldn't this suffice ?

    PHP Code: 
    =if(countif('[fileB.xls]Sheet1'!$F$2:$F$3000,B3)=0,"",INDEX('[fileB.xls]Sheet1'!$F$2:$G$3000,MAX(IF('[fileB.xls]Sheet1'!$F$2:$F$3000=B3,ROW($F$2:$F$3000)-1,0)),2)) 

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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