+ Reply to Thread
Results 1 to 6 of 6

Create Macro To Copy Moving Range of Rows

  1. #1
    Registered User
    Join Date
    09-26-2007
    Posts
    6

    Create Macro To Copy Moving Range of Rows

    I am a real novice as it relates to macros and could use some assistance. I have a spreadsheet that pulls info from our Oracle database. I have data in rows A-Z. Columns A-F have descriptions (e.g. property, acct#). Columns G-T contain the actual values. Once the data is retrieved I then have a macro to delete the zero rows. What I then need is a macro to do the following:

    Once my zero rows are deleted I need to have the block of data copied 3 rows below the last row of the data that was retrieved. My header line will always start at A10. The trick here is that the range of rows will change depending on the data that is retrieved and deleted.

    I then need to have a separate macro created to take the newly copied block of data and then have that info copied to a new workbook within the same spreadsheet.

    Any help here would be greatly appreciated.

    Thanks!

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    How about

    Please Login or Register  to view this content.

    rylo

  3. #3
    Registered User
    Join Date
    09-26-2007
    Posts
    6
    Thanks Rylo. I was able to take pieces of this macro and just use the piece for repeating the data below the original range.

    You have saved me hours of work! Thanks again!

  4. #4
    Registered User
    Join Date
    09-26-2007
    Posts
    6
    One last thing. Is it possible for you to add the code that lets you paste the data as values? Currently I have formulas in the data I am copying and I want to make the duplicate data values only.

    Any help would be appreciated.

    Thanks!

  5. #5
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Here goes

    Please Login or Register  to view this content.
    rylo

  6. #6
    Registered User
    Join Date
    09-26-2007
    Posts
    6
    Rylo,

    Thanks again . I can't thank you enough as I would have spent days trying to think of another solution that would not be even close to this. This is exactly what I needed to complete my project.

    Just picked myself up one of those beginner Excel VBA Programming books to start getting a feel for doing some of these things on my own.

    B

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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