+ Reply to Thread
Results 1 to 1 of 1

Macro to cut and paste a variable number of rows to a variable location?

  1. #1
    Registered User
    Join Date
    03-06-2015
    Location
    Newcastle, England
    MS-Off Ver
    2013
    Posts
    26

    Macro to cut and paste a variable number of rows to a variable location?

    Hi all,

    So my VBA skills aren't great and this has me stumped...

    I have 2 sheets, one called 'Plan' that tracks project work with columns that contain lists and formulae that I want to keep consistent. The other is called 'Template' and contains an unpopulated version of the populated columns in the Plan sheet but with the lists and formulae in.

    I am after a macro that will copy the unpopulated 'Template' rows, and paste it into the 'Plan' sheet. However, I want to be able to specify how many rows to paste and at what row number location.

    I am guessing this will require a macro that has a lookup to a numeric value in a cell to specify what row number to inset at and another lookup to another cell that contains the number of rows to paste (possibly letting the macro know how many times to loop).

    I have attached an example with the macro I currently have, which simply pastes in a bunch of lines at a fixed location.

    Please let me know if any further information is required.

    Really appreciate any help on this!

    Cheers,

    Chris

    EDIT: Ok so the macro in the example doesn't work because I changed the name of one of the sheets. You get the idea though.
    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. Macro to insert a variable number of rows into a variable location
    By TheClaw2323 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-08-2015, 05:31 AM
  2. [SOLVED] Macro - Paste to ColumnCell Location Based on a Variable
    By hoops85 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-17-2014, 12:13 PM
  3. Paste formula with variable location to column
    By Rigged in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-13-2013, 12:32 PM
  4. Replies: 6
    Last Post: 04-14-2012, 04:07 AM
  5. Variable number of rows in a macro
    By CrazyHorse in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-02-2011, 09:26 AM

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