Results 1 to 7 of 7

Macro to copy and paste a variable range

Threaded View

richard_a Macro to copy and paste a... 01-22-2013, 02:23 PM
RHCPgergo Re: Macro to copy and paste a... 01-22-2013, 02:31 PM
richard_a Re: Macro to copy and paste a... 01-22-2013, 02:38 PM
RHCPgergo Re: Macro to copy and paste a... 01-22-2013, 02:55 PM
richard_a Re: Macro to copy and paste a... 01-22-2013, 03:16 PM
RHCPgergo Re: Macro to copy and paste a... 01-22-2013, 03:36 PM
richard_a Re: Macro to copy and paste a... 01-24-2013, 06:26 AM
  1. #1
    Registered User
    Join Date
    01-22-2013
    Location
    Newcastle
    MS-Off Ver
    Excel 2007
    Posts
    5

    Macro to copy and paste a variable range

    Hi,

    I am looking to write a macro that will copy and paste several ranges of cell values from one worksheet (Team Report) to another (Data).

    The width of the ranges will always be constant, 63 columns (A to BK)
    The height of the ranges however will vary (from day to day). The number of rows in each range is specified in cell B5 in "Team Report"

    When running the macro I would like it to copy a range "B5" rows down by 63 columns wide from the starting point of A11 in "Team Report" and paste only the values into "Data" starting at cell B11.

    I would then like it to return to "Team Report" and copy the next range (again "B5" rows down by 63 columns wide, starting from where the last range had finished), pasting it into "Data" starting at cell B71.

    I have attempted this a few times myself, but my excel skills leave a lot to be desired when it comes to VBA. I suspect that it may need to involve the OFFSET function, using the value in B5 to dictate where to begin the copy selection.

    I have attached an example of how "Team Report" looks. The number of players can change on a daily basis but the value is always displayed in B5.

    Any help would be greatly appreciated.

    Regards,

    Richard
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

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