+ Reply to Thread
Results 1 to 9 of 9

Find last date in Row & return Header

  1. #1
    Registered User
    Join Date
    05-14-2015
    Location
    Kent
    MS-Off Ver
    365
    Posts
    20

    Unhappy Find last date in Row & return Header

    I've been trying to resolve a formula that a row can go to the last date entry and return the header within that column.

    Row H2-N2 has the headers for EACH columns (IE A,B,C,D,E,F,G)
    Row H3-N3 has dates in each cell and want to find the last date in that row (K3) or it can be a colour.
    Return this to E3 with header from K2

    Many Thanks
    Mike
    Attached Files Attached Files
    Last edited by mikey141; 07-10-2020 at 05:56 AM.

  2. #2
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,780

    Re: Find last date in Row & return Header

    E3=INDEX($H$2:$BN$2,,MATCH(LOOKUP(2,1/(H3:BN3<>"")/(ISNUMBER(H3:BN3)),H3:BN3),$H3:$BN3,0))

    Copy down

  3. #3
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Find last date in Row & return Header

    @CARACALLA: Your formula gives me a circular reference error.
    Maybe I'm missing something obvious?

    @mikey141: if CARACALLA's solution works for you then great. If not here's a few questions . . .

    I understand that you want to find the last date in a row, but beyond that I think some clarifications would be useful for any potential solver.

    1) In your example why does the date in K3 impact cell E3? Why not H3 or C3 ??

    2) You say "Return this [the last date in that row] to E3 with header from K2". What does "with header from K2" mean? What exactly are you expecting in E3?

    3) "or it can be a colour" - what does this mean?

    4) Assuming a formula can be found for what you want to do, what cells would be populated with that formula?

    Hopefully your clarifications will be useful to a potential helper.

    EDIT: ********* Disregard this post in its entirety - total confusion on my behalf.
    Last edited by GeoffW283; 07-10-2020 at 03:08 PM.

  4. #4
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,780

    Re: Find last date in Row & return Header

    attach file
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,147

    Re: Find last date in Row & return Header

    @GeoffW283 ;

    CARACALLA's formula (except, "E3" at the beginning) worked for me and returned the text in cell R2 as the related "header".

  6. #6
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,147

    Re: Find last date in Row & return Header

    Another alternative formula to be used in cell E3 is;

    You may need to change ";" with "," depending on your Excel settings.

    Please Login or Register  to view this content.
    Sample file is attached...
    Attached Files Attached Files
    Last edited by Haluk; 07-09-2020 at 12:14 PM. Reason: typo...

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

    Re: Find last date in Row & return Header

    Another option
    =LOOKUP(2,1/(ISNUMBER(G3:BN3)),$G$2:$BN$2)
    or if you want & the headre
    =TEXT(LOOKUP(2,1/(ISNUMBER(G3:BN3)),$G3:$BN3),"dd/mm/yy")&" "&LOOKUP(2,1/(ISNUMBER(G3:BN3)),$G$2:$BN$2)

  8. #8
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Find last date in Row & return Header

    Quote Originally Posted by Haluk View Post
    @GeoffW283 ;

    CARACALLA's formula (except, "E3" at the beginning) worked for me and returned the text in cell R2 as the related "header".
    Thanks for the input. My confusion was mistakenly reading row-2 as being column headers (tempted with the A, B, C . . . values in that row) so when the OP was asking for the result in E3 I was actually looking at cell L3, leading to my total confusion . Time for a cup of coffee or three!

  9. #9
    Registered User
    Join Date
    05-14-2015
    Location
    Kent
    MS-Off Ver
    365
    Posts
    20

    Re: Find last date in Row & return Header

    Thanks to everyone's response and works nicely after days looking into different formulas

+ 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. Find the nth non-zero value in a column and return the header
    By leleaida in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-27-2019, 11:46 AM
  2. [SOLVED] Look for vertical value then find max value in row and return row header
    By Ale84 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-10-2015, 03:22 PM
  3. Find value and return row header
    By Gerardo83 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-14-2015, 08:16 PM
  4. Find name and return header
    By Gerardo83 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-08-2015, 01:06 PM
  5. [SOLVED] Find a date within a date range and return the header
    By huy_le in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-03-2014, 06:09 PM
  6. [SOLVED] Find specific value in table and return header row and header column value
    By nelwan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-30-2013, 01:35 AM
  7. Find a value and return value of the row and column header
    By JG2011 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 10-31-2011, 03:48 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