+ Reply to Thread
Results 1 to 23 of 23

Return row number for highest date with given lookup value (no matrix please)

  1. #1
    Registered User
    Join Date
    03-13-2012
    Location
    Deventer, Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    64

    Return row number for highest date with given lookup value (no matrix please)

    Hi there,
    I'm searching for a formula which will return me the*row number*for the row containing the highest date (column A) together with a given lookup value (column B). So the outcome would be '16.02.2015', in the attached xls.

    Would like this not to be a matrix formula, as matrix formulae tend to slow down my spreadhseet formula when copied through over many rows.

    Greatly appreciated if someone could help me.

    Thanks,
    Niels
    Attached Files Attached Files
    Last edited by nielsb; 07-21-2015 at 06:10 PM.

  2. #2
    Valued Forum Contributor nigelbloomy's Avatar
    Join Date
    11-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1,011

    Re: Return row number for highest date with given lookup value (no matrix please)

    Does this work for you?
    Please Login or Register  to view this content.
    Some people volunteer in soup kitchens or hospitals. I choose to make the world better by trying to help you with Excel. We're all learning.

    <---Click * Add Reputation for all helpful comments. It's like giving a smile.
    Forum Rules: How to mark your post [Solved] and have a happier, Excel enriched life.

  3. #3
    Registered User
    Join Date
    03-13-2012
    Location
    Deventer, Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    64

    Re: Return row number for highest date with given lookup value (no matrix please)

    no, doesn't work..

  4. #4
    Valued Forum Contributor nigelbloomy's Avatar
    Join Date
    11-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1,011

    Re: Return row number for highest date with given lookup value (no matrix please)

    Was it the relative references that didn't work when you drug it down the column? This will fix that:
    Please Login or Register  to view this content.
    Was there something else that didn't work. It appears to work in the attached file.
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,188

    Re: Return row number for highest date with given lookup value (no matrix please)

    ... worked for me to simply entered into E6.

  6. #6
    Registered User
    Join Date
    03-13-2012
    Location
    Deventer, Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    64

    Re: Return row number for highest date with given lookup value (no matrix please)

    I don't understand... The formula works in the xls you uploaded.. But when I copy it into my own spreadsheet it doesn't...

    I attached a stripped down (for filesize reasons) copy of my own spreadsheet. Can anybody have a look why the formula isn't working here?
    Attached Files Attached Files

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Return row number for highest date with given lookup value (no matrix please)

    The "N/A' in your date column messes up the formula. Remove that and then try it
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  8. #8
    Valued Forum Contributor nigelbloomy's Avatar
    Join Date
    11-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1,011

    Re: Return row number for highest date with given lookup value (no matrix please)

    The "na" value in line 12 is messing up the formula. Is it possible to simply delete that row?

  9. #9
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Return row number for highest date with given lookup value (no matrix please)

    @NielsB

    Please Login or Register  to view this content.
    That is much to easy, please tell the forummembers why it is not working for you.

    See #4 ad #5 they show it is working.

    My solution with a pivot table.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  10. #10
    Registered User
    Join Date
    03-13-2012
    Location
    Deventer, Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    64

    Re: Return row number for highest date with given lookup value (no matrix please)

    Quote Originally Posted by ChemistB View Post
    The "N/A' in your date column messes up the formula. Remove that and then try it
    This was the trick... The NA indeed messed up the result.. Only now I see to have given wrong instruction in the sheet.. I need to have the row number returned not the date.. What would the formula look like??

  11. #11
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Return row number for highest date with given lookup value (no matrix please)

    Please Login or Register  to view this content.
    Probably with index / match.

    What are you gonna do with that information?

    Please explain more of your goal.

  12. #12
    Registered User
    Join Date
    03-13-2012
    Location
    Deventer, Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    64

    Re: Return row number for highest date with given lookup value (no matrix please)

    The row number will be used to form adresses which will be used to provide information (some are text) in several adjacent columns. At first I had matrix formulae in all these columns, but the sheet got terribly slow that way..
    Last edited by nielsb; 07-21-2015 at 05:16 PM.

  13. #13
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Return row number for highest date with given lookup value (no matrix please)

    Please Login or Register  to view this content.
    This is not clear to me, maybe for other forummembers.

    See the attached file, for the rownumbers in the pivot table.

    If this give the correct answers, an index / match formula can show the result (dutch => index / vergelijken).

  14. #14
    Valued Forum Contributor nigelbloomy's Avatar
    Join Date
    11-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1,011

    Re: Return row number for highest date with given lookup value (no matrix please)

    This should give you the row number.
    Please Login or Register  to view this content.

  15. #15
    Registered User
    Join Date
    03-13-2012
    Location
    Deventer, Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    64

    Re: Return row number for highest date with given lookup value (no matrix please)

    @oeldere, I appreciate your effort.. But the pivot table doesn't help me..

    I have restated the question in attached sheet..
    Attached Files Attached Files

  16. #16
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Return row number for highest date with given lookup value (no matrix please)

    Please also, reply to the other forummember who have given an answer to you.

    Maybe the answer is already there.

  17. #17
    Registered User
    Join Date
    03-13-2012
    Location
    Deventer, Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    64

    Re: Return row number for highest date with given lookup value (no matrix please)

    @nigelbloomy, Can you upload an xls with the formula working?

  18. #18
    Registered User
    Join Date
    03-13-2012
    Location
    Deventer, Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    64

    Re: Return row number for highest date with given lookup value (no matrix please)

    @nigelbloomy,
    can you upload an xls with the working formula?

  19. #19
    Valued Forum Contributor nigelbloomy's Avatar
    Join Date
    11-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1,011

    Re: Return row number for highest date with given lookup value (no matrix please)

    I believe this formula in B2 works on the FINAL tab.
    Please Login or Register  to view this content.

  20. #20
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Return row number for highest date with given lookup value (no matrix please)

    excuse me, I used the sum in the pivot table.

    of course it had to be the max (value).

    see the attached file.


    in nigelbloomy's formula change the row into rij
    Please Login or Register  to view this content.
    Last edited by oeldere; 07-21-2015 at 05:49 PM.

  21. #21
    Registered User
    Join Date
    03-13-2012
    Location
    Deventer, Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    64

    Re: Return row number for highest date with given lookup value (no matrix please)

    Nigel, your post helped me perfectly.. Thanks a great deal!

  22. #22
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Return row number for highest date with given lookup value (no matrix please)

    You're welcome. We appreciate the feedback!

    It'd also be appreciated if you were to click the add Reputation button at the foot of any of the posts of those who helped you reach a solution.

  23. #23
    Valued Forum Contributor nigelbloomy's Avatar
    Join Date
    11-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1,011

    Re: Return row number for highest date with given lookup value (no matrix please)

    Thank you. It was a team effort.

+ 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] Lookup of date and other condition to return row header from matrix
    By Londonbound in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-29-2015, 10:09 AM
  2. [SOLVED] Formula to Lookup the highest Value in Col and return Values Cols in same Row
    By hammer2 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-04-2015, 04:17 AM
  3. [SOLVED] How2 find number in range and return that number or if doesn't exist then the next highest
    By Crawfinator1 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 06-06-2014, 08:52 AM
  4. [SOLVED] Can vlookup return highest cell value of in the relation to Lookup Value?
    By wado1 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-26-2013, 02:18 PM
  5. Lookup product then return highest value for it help
    By interested in forum Excel General
    Replies: 3
    Last Post: 01-22-2012, 02:02 PM
  6. Return highest number with date
    By ClearConcept in forum Excel General
    Replies: 2
    Last Post: 10-09-2009, 12:05 PM
  7. Return number of days until a date found in a lookup table
    By midwestgirl80 in forum Excel General
    Replies: 1
    Last Post: 08-08-2009, 10:07 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