+ Reply to Thread
Results 1 to 8 of 8

Moving data based on dates

  1. #1
    Registered User
    Join Date
    07-13-2015
    Location
    Brisbane, Australia
    MS-Off Ver
    2013
    Posts
    31

    Angry Moving data based on dates

    Hi team,

    I am trying to store a daily report as historical data under each queue.

    Please see example for more details.
    Matching date data.xlsx

  2. #2
    Registered User
    Join Date
    07-13-2015
    Location
    Brisbane, Australia
    MS-Off Ver
    2013
    Posts
    31

    Re: Moving data based on dates

    I am still having trouble trying to figure this out.

    Any help would be much appreciated,

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,945

    Re: Moving data based on dates

    I'm guessing you have no responses because you have not indicated what your report should look like. I would urge you to explain in simple language using your worksheet as an example what you want to happen specifically. I am sure it is clear in your head, but unfortunately, we here at the forum are not mind readers. Tell us simply what is on your mind.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Registered User
    Join Date
    07-13-2015
    Location
    Brisbane, Australia
    MS-Off Ver
    2013
    Posts
    31

    Re: Moving data based on dates

    Thanks Alan,

    I have adjusted the example to show more clearly where I want the data to go but I'll try & explain it as well. Matching date data.xlsx

    I currently have a daily report which we run every morning similar to the format on sheet 1. Once a new report is generated all the information from the previous day is lost.
    What I would like is for the information from the daily report "Before" to be transferred to each of their queues in another tab "After" and for them to go under the date that is shown on the daily report. If this is not possible a button that just moves the data to the next available row in those queues.

    Thanks again
    Last edited by BC TIPPING; 08-16-2015 at 09:53 PM.

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,945

    Re: Moving data based on dates

    Here some VBA code that will place that information in the correct location (next blank rows) when you close the file.

    Please Login or Register  to view this content.
    Open the VBA editior (Alt +F11)
    In the left window, double click on the item listed as ThisWorkbook
    In the new right window, paste in the above code.
    Close the window.

  6. #6
    Registered User
    Join Date
    07-13-2015
    Location
    Brisbane, Australia
    MS-Off Ver
    2013
    Posts
    31

    Re: Moving data based on dates

    Thanks ALan,

    It has a script error at
    lr = sh.Range("P" & Rows.Count).End(xlUp).Row

  7. #7
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,945

    Re: Moving data based on dates

    Was having some issues with the Before Close Event, so I changed this to a straight Macro.

    Please Login or Register  to view this content.
    How to install your new code
    1. Copy the Excel VBA code
    2. Select the workbook in which you want to store the Excel VBA code
    3. Press Alt+F11 to open the Visual Basic Editor
    4. Choose Insert > Module
    5. Edit > Paste the macro into the module that appeared
    6. Close the VBEditor
    7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    To run the Excel VBA code:
    1. Press Alt-F8 to open the macro list
    2. Select a macro in the list
    3. Click the Run button

  8. #8
    Registered User
    Join Date
    07-13-2015
    Location
    Brisbane, Australia
    MS-Off Ver
    2013
    Posts
    31

    Re: Moving data based on dates

    Works perfectly, Thanks

+ 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: 1
    Last Post: 12-17-2014, 08:14 PM
  2. Moving data from a column to rows based on another calls data
    By Emmylou in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-13-2014, 07:42 AM
  3. [SOLVED] Moving data based on the date
    By Punter! in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 01-30-2013, 08:37 AM
  4. Moving data amongst sheets based on name
    By ball1132 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-18-2012, 02:22 PM
  5. Moving data based on If
    By D_N_L in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-17-2011, 09:01 AM
  6. VB - Moving data based on If
    By D_N_L in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-23-2011, 02:35 PM
  7. Replies: 1
    Last Post: 04-26-2009, 08:16 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