+ Reply to Thread
Results 1 to 3 of 3

macro that copies data in cell and paste it to cell x columns to right in shhet

  1. #1
    Registered User
    Join Date
    09-26-2013
    Location
    Southampton
    MS-Off Ver
    Excel 2003
    Posts
    3

    macro that copies data in cell and paste it to cell x columns to right in shhet

    Is there a macro that copies the data from a cell and paste it a specified number of colums to the right. Ideally the specified number of columns to paste the data to the right would be drawn from a cell with a number in that could be changed. Is this possible?

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,374

    Re: macro that copies data in cell and paste it to cell x columns to right in shhet

    There easily could be. Do you want the macro to operate on the active/selected cell? And from where do you want to get the offset value?

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    09-26-2013
    Location
    Southampton
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: macro that copies data in cell and paste it to cell x columns to right in shhet

    Ideally, what I need is a macro that copies the data from cells A2:A4, B2:B4, C2:C4 and paste it into a different sheet a specified number of columns to the right, dependent upon the vale that is in the corresponding cell A1, B1 or C1. So for example, if the data were:

    A1 = 11, B1 = 7, C1 = 9
    A2 = 50, B2 = 200, C2 = 500
    A3 = 150, B3 = 400, C3= 100

    Then the macro would paste the values in cells A2:A3 in cells L2:L3 in a different sheet (11 columns to the right of column A). Similarly it would paste the value in cells B2:B3 into cells I2:I3 (7 columns to the right of column b) and would paste the values of cells C2:C3 into cells L2:L3 (9 columns to the right of column c). Since the values of the cells in A2:A3 and C2:C3 are both pasted into cells L2:L3 it would add the values together so L2 = (50 +500) = 550, L3 = (150 + 100) = 250.

    Does this make sense? Is this possible?

+ 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. Need Help Creating a Macro That Finds New Data and Copies it to Another Cell
    By fly91 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-16-2013, 09:14 PM
  2. Macro that copies and pastes value from one cell, if another cell contains data
    By defensorfedei in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-02-2012, 11:54 PM
  3. [SOLVED] Macro that copies every 600 rows and paste data in new spreadsheet
    By Bealey in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-27-2012, 09:38 AM
  4. macro that copies a value from a cell at certain times
    By kagein in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-04-2009, 01:41 PM
  5. macro to copy & paste cell data into another cell
    By dannyboy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-23-2005, 01:10 PM

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