+ Reply to Thread
Results 1 to 2 of 2

Copy a range in Next row (with changing timestamp)

  1. #1
    Registered User
    Join Date
    06-16-2020
    Location
    gopeshwar
    MS-Off Ver
    2019
    Posts
    1

    Copy a range in Next row (with changing timestamp)

    I have a excel sheet which refreshes after every 2 min interval. Data in range A2:F2 and range I2:L2 changes as workbook refreshes. A2 caries timestamp {in excel i used =Now() function}
    I want that every time whenever A2:F2 and range I2:L2 changes after 2 min. the data in these ranges get copied in next row (In range A3:F3 and range I3:L3 ) and again when it refreshes it get copied in next empty row (range A4:F4 and range I4:L4 ) and so on and also it should get reset next day at a perticular time say 6:00 am and again start copying data in range A2:F2 and range I2:L2
    Attached Files Attached Files

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Copy a range in Next row (with changing timestamp)

    It really would be more efficient to modify your query code so that after it refreshes, it just copies row 2 to the next available row. But maybe it can also be done with w worksheet_Change event code. Copy this to the sheet code module for the sheet where the refresh takes place.

    Please Login or Register  to view this content.
    A potential problem would be that it copies for each cell in columns B:F.I don't know how your Query code is written to populate those cells on a refresh. If they are all populated simutaneously, no problem, but if they are populated consecutively then you might get multiple pastings of the same data on your sheet. Like I said, the ideal way would be to have the code that does the refresh modified to also do the copy and paste.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

+ 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] Need Formula to Change Date Format without changing the timestamp
    By siobeh in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-13-2014, 04:41 PM
  2. Changing the copy and paste Range
    By gjaylward2008 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-13-2012, 09:58 AM
  3. [SOLVED] How do you copy RANK w/o it changing the range?
    By Bernie Deitrick in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 07:05 AM
  4. How do you copy RANK w/o it changing the range?
    By jspan in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  5. How do you copy RANK w/o it changing the range?
    By jspan in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  6. [SOLVED] How do you copy RANK w/o it changing the range?
    By jspan in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  7. [SOLVED] How do you copy RANK w/o it changing the range?
    By jspan in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  8. [SOLVED] How do you copy RANK w/o it changing the range?
    By jspan in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-20-2005, 10:06 PM

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