+ Reply to Thread
Results 1 to 4 of 4

Formula to sum variable number of values in a column variable by date lookup ...

  1. #1
    Registered User
    Join Date
    11-17-2020
    Location
    Surrey, England
    MS-Off Ver
    16.43 for Mac
    Posts
    2

    Formula to sum variable number of values in a column variable by date lookup ...

    Many thanks in advance for any guidance provided.

    Problem Description

    My column A has randomly spaced yet increasing reporting dates going back over time. So sometimes consecutive dates would be present other times gaps of multiple days would also be present.

    My column B has points entered for each date row.

    I want my column C to show the sum of all points going back over the last 7 days from the date of the row. So sometimes that could be 2 rows back other times 3 or 4 etc ... it varies.

    So I need a formula in my active cell in column C that takes the date of my row from column A looks back up column A till it sees a date 7 days earlier then sums up the points from that row in column B to my current row in column B placing the sum total in my active cell in column C

    Kind regards

    SNP529
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,777

    Re: Formula to sum variable number of values in a column variable by date lookup ...

    Explain the sample results you have given. Why are the first three N/A? Why does it go from 32 to 26 (C9 and C10)?

    Maybe in C4 copied down:

    =SUMIFS($B$4:$B$19,$A$4:$A$19,"<="&A4,$A$4:$A$19,">="&A4-7)
    Last edited by AliGW; 11-17-2020 at 12:47 PM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    11-17-2020
    Location
    Surrey, England
    MS-Off Ver
    16.43 for Mac
    Posts
    2

    Re: Formula to sum variable number of values in a column variable by date lookup ...

    Hi Ali .... brilliant !! That fixed it just as required. You are a star.
    Kind regards
    Simon

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,777

    Re: Formula to sum variable number of values in a column variable by date lookup ...

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. Replies: 6
    Last Post: 09-30-2020, 09:42 PM
  2. VBA: Extract variable number of rows per variable number of phone numbers
    By redstone2830 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-17-2018, 09:22 PM
  3. Changing column variable on a copied formula instead of row variable
    By dsw283 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-06-2014, 04:13 PM
  4. [SOLVED] Reference a variable cell in a SUM formula based on values in a different column
    By sshot1 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-17-2013, 12:40 PM
  5. Copy column variable number of times between start date and end date
    By gbisk in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-12-2013, 07:57 AM
  6. Replies: 6
    Last Post: 04-14-2012, 04:07 AM
  7. Replies: 3
    Last Post: 11-14-2008, 06:40 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