+ Reply to Thread
Results 1 to 8 of 8

find last value in variable length rows and its date column header

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    06-21-2005
    Location
    Cambridge, England
    Posts
    118

    find last value in variable length rows and its date column header

    Hi
    I need help with a formula to find the last value in a row and then also its column header which is a date
    Rows are of variable lengths. values change over rows, there may be gaps in the data.
    example extract Excel file attached
    Many thanks
    Attached Files Attached Files
    R

  2. #2
    Valued Forum Contributor
    Join Date
    10-29-2012
    Location
    Mojokerto,Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    554

    Re: find last value in variable length rows and its date column header

    at B6 array formula (CSE)
    =INDEX($D$5:$W$5,MAX(IF(LEN(D6:W6),COLUMN(D6:W6)))-3)

  3. #3
    Forum Contributor
    Join Date
    06-21-2005
    Location
    Cambridge, England
    Posts
    118

    Re: find last value in variable length rows and its date column header

    Thank you so much, that works great with the date.
    Can any one help with the formula for column A - the last value

    Thank you.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,558

    Re: find last value in variable length rows and its date column header

    Normal formulae committed with just the Enter key:

    Value:
    Formula: copy to clipboard
    =INDEX($D6:$Z6, MATCH(9.99E+99, $D6:$Z6,1))

    Date:
    Formula: copy to clipboard
    =INDEX($D$5:$Z$5, MATCH(9.99E+99, $D6:$Z6,1))
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Valued Forum Contributor
    Join Date
    10-29-2012
    Location
    Mojokerto,Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    554

    Re: find last value in variable length rows and its date column header

    to fill column A array formula
    =INDEX(D6:W6,MAX(IF(LEN(D6:W6),COLUMN(D6:W6)))-3)
    copy down

  6. #6
    Forum Contributor
    Join Date
    06-21-2005
    Location
    Cambridge, England
    Posts
    118

    Re: find last value in variable length rows and its date column header

    Thank you both, all works well.

  7. #7
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    China Shanghai
    MS-Off Ver
    365 V2503 and WPS V2024(12.1.0.18543)
    Posts
    4,026

    Re: find last value in variable length rows and its date column header

    cell A6 formula , drag down

    HTML Code: 
    cell B6 formula , drag down

    HTML Code: 

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,558

    Re: find last value in variable length rows and its date column header

    You're welcome. Thanks for the rep.


    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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. VBA Insert Blank Line and Header in Variable Length Group
    By Allienne in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-13-2018, 08:46 AM
  2. How to find the last number in a variable length column.
    By TonyS52 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-17-2017, 09:39 AM
  3. Find Max value and return column header, multiple rows
    By Setanta11 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-13-2015, 04:58 AM
  4. [SOLVED] Find the first empty cell from any of a group of variable length rows
    By j_Southern in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-22-2014, 05:47 PM
  5. Replies: 10
    Last Post: 08-01-2013, 06:25 AM
  6. [SOLVED] How to find Column with a header that has a variable that changes evry week
    By JMG14 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-08-2012, 08:20 AM
  7. Replies: 6
    Last Post: 04-14-2012, 04:07 AM

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