+ Reply to Thread
Results 1 to 6 of 6

Find last date in range (with blanks) that is less than TODAY()

  1. #1
    Registered User
    Join Date
    11-22-2010
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    13

    Question Find last date in range (with blanks) that is less than TODAY()

    I have a worksheet with dates listed in row 30, beginning in column H and extending at least through column II. The dates are in ascending order and are both past and future dates. There are 4 blank cells between each date in row 30, which can't be edited or deleted.

    I need a formula that will find the column containing the MAX date that is less than TODAY() and then sum every 5th cell of row 70 starting with I70 and ending with the cell in row 70 that corresponds to the column in which the MAX date was found in the first step. The last cell to be included in the calculation range will be the MAX date column +1.

    For example, if the MAX date that is less than TODAY() is located in DS30, I need to calculate the sum of I70 + N70 + S70 + X70 + so on through DT70.

    I've tried =MIN & =MAX(IF(H30:II30<TODAY(),H30:II30,0)), but it only returns the first date value in the range (MIN) or the last date value in the range (MAX). I think I'm on the right track, but I can't figure out what I'm doing wrong.

    Any suggestions? Please help! I'm pulling my hair out!

    Also, In the future, I will be adding more dates after column II, so I need to be able to edit the formula to eventually include columns past II.
    Last edited by cbsalt; 03-14-2011 at 01:11 PM. Reason: Solved

  2. #2
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    629

    Re: Find last date in range (with blanks) that is less than TODAY()

    =MAX(IF(B4:B100<TODAY(),B4:B100)) Ctrl + Shift + Enter This will return the largest date earlier than Today. If you want to include Today as a possible output, put = in there ie <=Today()
    Windows 7 using Office 2007 & 2010

    Remember your [ code ] [ /code ] tags, makes reading soooo much easier

  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Find last date in range (with blanks) that is less than TODAY()

    If I understand you correctly....
    • There are dates in Row_30, beginning in M30 and continuing every 5th cell to the right, with blanks between the dates.
    Example:
    Dates (separated by blank cells) in:
    M30, R30,W30...

    • There are numeric values in Row_70
    • For each date in Row_30 that is less than today, add each corresponding cell from Row_70 that is one column to the right of the column with the date cell
    • Add the value in I70 to that total

    If that's correct, this regular formula does that for columns I through EB:
    Please Login or Register  to view this content.

    Adjust the referenced range to suit your situation.

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Find last date in range (with blanks) that is less than TODAY()

    Wouldn't SUMIF suffice? Try this formula

    =SUMIF(H30:II30,"<"&TODAY(),I70:IJ70)
    Audere est facere

  5. #5
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Find last date in range (with blanks) that is less than TODAY()

    Nope! that formula is completely wrong...Oops, Clicked SAVE too soon while I was playing around.
    I believe the formula you posted is exactly right.
    Last edited by Ron Coderre; 03-11-2011 at 09:50 PM.

  6. #6
    Registered User
    Join Date
    11-22-2010
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    13

    Talking Re: Find last date in range (with blanks) that is less than TODAY()

    Thanks! My final (working - yay!) formula is =SUMIF(H30:II30,"<"&TODAY(),I69:IJ69)

    I'm so grateful for all the advice I received!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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