+ Reply to Thread
Results 1 to 6 of 6

Copy & paste data if today is within X days of Y date

  1. #1
    Registered User
    Join Date
    07-21-2014
    Location
    England
    MS-Off Ver
    365
    Posts
    30

    Copy & paste data if today is within X days of Y date

    Hello there,

    I'm looking to use a sumifs formula, and copy and paste (and 'store') the summed value if its the relevant time to do so.

    I have attached a sample sheet. On the left is a sample table, with column C containing the values I'd like to aggregate by 'company' (column A). The issue I have is that values in column C are overwritten with updated values every quarter. Therefore I'm trying to copy and paste what the aggregated values are every 3 months (before they're overwritten) and store them according to their relevant quarter - see table on the right side.

    So I'm wondering if a sumifs formula could include something like an if statement which assesses - 'if today is within 30 days of the 'Data check date' (G2:M2) then complete the neccessary sumifs formula. And store as a value so it doesn't change going forward, when data is overwritten'

    I would want to copy the formula into future quarters but leave as blank until the relevant time.

    Is this possible (without VBA)?

    Thanks for your help.

    Greg
    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 (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,204

    Re: Copy & paste data if today is within X days of Y date

    There are no dates in the source table, so how do you propose calculating this?

    Please add at lest a few expected results to the yellow area. Thanks.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    07-21-2014
    Location
    England
    MS-Off Ver
    365
    Posts
    30

    Re: Copy & paste data if today is within X days of Y date

    Hi @AliGW

    Appreciate the response.

    Please see attached a v2 of the sample file with some expected results.

    I'm proposing to calculate by today's date, i.e. the date the file is opened.

    In the new file I've added a second source table just to exemplify how the data might look in 3 months. However, to be clear, there actually only one source table, that gets updated every 3 months. I'm attempting to extract data every quarter before the update (and opverwrite) occurs.

    Does that help?

    Greg
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    07-21-2014
    Location
    England
    MS-Off Ver
    365
    Posts
    30

    Re: Copy & paste data if today is within X days of Y date

    [Bump]

    Hello, would anyone be able to help with this query please?

    Thank you in advance.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,204

    Re: Copy & paste data if today is within X days of Y date

    Unless the rows are dated, you cannot filter the data and sum it for the summaries, as Excel won't know what's new and what isn't.

  6. #6
    Registered User
    Join Date
    07-21-2014
    Location
    England
    MS-Off Ver
    365
    Posts
    30

    Re: Copy & paste data if today is within X days of Y date

    Thanks for the reply @AliGW.

    So would it be possible if the source data has a column which has a date column that is updated each time the data is updated? (See attached updated file)

    With this addition, are there any ways for the Excel to 'capture' repayments numbers within a certain time period (e.g. within 30 days of a 'data check date') - e.g. automatically copy and paste them into a quarter by quarter table, before the data gets overwritten?

    I would want to copy the formula into future quarters but leave as blank until the relevant time.


    (In the file I've added a second and third source table (A17:C27 and A30:C40) just to exemplify how the data looked like 3 months ago and how it might look in 3 months. However, to be clear, there is actually only one source table, that gets updated every 3 months. I'm attempting to extract data every quarter before the update (and overwrite) occurs.)
    Attached Files Attached Files

+ 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] copy today date and paste as value pending on a value on other cell
    By Rocky2013 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-31-2016, 10:53 AM
  2. Looking to display data in a cell, only if today's date is 7 days past a cell's date
    By mbenderpetassure in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-20-2015, 01:57 PM
  3. LOOK UP, COPY PASTE into Another Sheet Within SAME Workbook - with TODAY Date
    By CHRISOK in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-11-2014, 06:22 PM
  4. Copy, Paste loop based on today's Date
    By oscarmiike in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-22-2014, 09:05 PM
  5. [SOLVED] Macro needed to copy rows from sheet1 and paste to sheet2 if date in colmn h is >today
    By Rekoons38 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 01-10-2014, 12:44 PM
  6. [SOLVED] Macro w shortcut key to paste date 28 days from today into active cell
    By Zooka in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-07-2013, 06:08 PM
  7. Macro to copy Data where Date is > Today()
    By MrSmith12 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-06-2011, 11:55 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