+ Reply to Thread
Results 1 to 4 of 4

VBA Macro for Data Movement/Deletion

  1. #1
    Registered User
    Join Date
    06-12-2013
    Location
    Poughkeepsie, NY
    MS-Off Ver
    Excel 2003
    Posts
    36

    VBA Macro for Data Movement/Deletion

    Hello all,

    So essentially I need a VBA Macro code for Excel 2003 that can take raw data that is input every month via a text document and move it to the next sheet in the workbook. This data is essentially broken down by a "platform" in the raw data section ("P") with monthly totals for each month but it is broken down by platform in total which goes in descending monthly order on the "dat" tabs (which is the final place for the data).

    So what needs to happen is the data for the last two years must go from the "P" tab to the "PDat" tab under the correct platform and the correct spot for the newest month. The data that is input each month is in the same format month to month, just starting two rows down from the last month.

    At the end of two years, the oldest year of data must be deleted and the other data moved up to the vacant area so that the sheet never grows too large (ie at the end of this year 2012 will be deleted and all the data will need to get moved up).

    Attached is a sample data workbook. Please let me know if this is possible. Thanks and appreciate the help.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: VBA Macro for Data Movement/Deletion

    Have you had a look at recording the macros to do this? Will help a great deal.

    Its best just to post the bits you're stuck with, with details of what you've tried, rather than what you want as it can be intrepeted as you want someone to do your job We're only here to help ;o)
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Registered User
    Join Date
    06-12-2013
    Location
    Poughkeepsie, NY
    MS-Off Ver
    Excel 2003
    Posts
    36

    Re: VBA Macro for Data Movement/Deletion

    Yes, I have looked into recording it. I was more just wondering if there was a short code that could be written instead of going through the process of recording it manually. That would be a very labor intensive process as you must go through each row for each month and copy and paste them. 432 copy pastes.

    If there is no other option, and that is the only route, then it will definitely be done.

  4. #4
    Registered User
    Join Date
    06-12-2013
    Location
    Poughkeepsie, NY
    MS-Off Ver
    Excel 2003
    Posts
    36

    Re: VBA Macro for Data Movement/Deletion

    Okay well here's what I have so far for the deletion aspect of it (assuming that the rest of the 2014 year was filled out). This would be the deletion of data from 2012 and the movement of 2013/2014 up to fit correctly.

    Please Login or Register  to view this content.
    I get an error in the paste of the range. The range selected to paste the range cut will not populate and I get a run time error 438, "Object doesn't support this property or method".

+ 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] No stock movement macro
    By makinmomb in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-10-2014, 08:15 AM
  2. Prevent workbook deletion or create the copy upon the deletion?
    By ciapul12 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-29-2014, 04:35 PM
  3. Create a Macro that wont allow movement with the workbook until macro is run
    By Dial1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-10-2014, 11:20 AM
  4. Run macro if no mouse movement and workbook active
    By Subject_Name_Here in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-30-2013, 12:50 AM
  5. Protect checkboxes from movement or deletion
    By truebuilders in forum Excel General
    Replies: 3
    Last Post: 09-09-2009, 04:46 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