+ Reply to Thread
Results 1 to 4 of 4

Copy static range and paste at new cell. Macro VBA

  1. #1
    Registered User
    Join Date
    01-15-2015
    Location
    Stoke-on_trent
    MS-Off Ver
    2010
    Posts
    16

    Copy static range and paste at new cell. Macro VBA

    I have a range F5:H79.

    At present I copy this range and paste it at cell I5
    and subsequently L5 etc.
    What I would like to do is automate this ie copy $F$5:$H$79 and then paste where my cell is highlighted.I5,L5,O5 etc
    Ideally I would like to paste without having to select the cell (ie everytime i press the button it pastes to the next available cell5 if you see what i mean?)

    I tried to record a Macro by just Copying and Pasting to the same cells but made a right mess of it!!

    Appriciate some help.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Copy static range and paste at new cell. Macro VBA

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    09-10-2014
    Location
    Matrix
    MS-Off Ver
    2010
    Posts
    70

    Re: Copy static range and paste at new cell. Macro VBA

    You have to calculate last, non-empty column e.g.
    Please Login or Register  to view this content.
    (*) Reputation points appreciated.
    excelbs.tk

  4. #4
    Registered User
    Join Date
    01-15-2015
    Location
    Stoke-on_trent
    MS-Off Ver
    2010
    Posts
    16

    Re: Copy static range and paste at new cell. Macro VBA

    Thanks for the reponse:
    This copies the range to the relevant columns listed ie colum f has copied to column I column G to L and H to O !!
    I may have not explained myself very well.

    If I describe what I do manually then you may understand a little btter.

    I copy the range F5:H79
    select I5 and paste.
    I copy F5:H79
    select cell L5 and paste ad infinitum.

    There should not be any static reference in the Macro or I will have to put twenty years of column rferences in.

    Another way that the same result i9s achieved manually is by selecting the F5:H79 range and dragging it right over three columns and then sunsequently dragging that range (I5:K:79) across three columns.

    i hope you see what it is im trying to automate?

    I haven't come to the select next free column.

+ 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. Copy and Paste a range based on a cell value that is not static
    By JmundleBofA in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-10-2014, 03:25 PM
  2. Replies: 1
    Last Post: 01-03-2014, 03:01 AM
  3. [SOLVED] Macro to copy a cell range and paste to a new sheet 'n' times where 'n' defined by formula
    By staminaboy in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-26-2013, 11:39 AM
  4. Macro to copy and paste range based on cell value
    By msls09 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-05-2013, 12:57 AM
  5. Change range of cells within VBA macro and copy and paste to fixed cell range
    By Mannyny in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-20-2012, 11:51 AM
  6. Macro. Copy range of cells (e,g, =A1:B9) and paste it into single cell.
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-26-2011, 09:28 AM
  7. Macro: IF given range contains a comment box, then copy cell D1 and paste.
    By azhar.sayed in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-10-2011, 07:22 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