+ Reply to Thread
Results 1 to 2 of 2

VBA Copy from one sheet and paste two cells to the right from active cell on another sheet

  1. #1
    Forum Contributor
    Join Date
    09-09-2013
    Location
    California, USA
    MS-Off Ver
    MS 365 Subscription
    Posts
    130

    VBA Copy from one sheet and paste two cells to the right from active cell on another sheet

    Hello,
    I am using a data validation list in cell A22 on sheet1 to call a macro. For example, when I select "1" from the list, I want a macro to copy the range ("C46:BH63") from sheet2 and paste it 2 cells to the right, for example ("C22:BH39"), of the data validation cell on sheet1. I want it to paste right of the data validation list cell because in sheet1 I will have many of this same list, just in different locations vertically.

    I am currently using this code to copy:


    Sub Copy_Info1

    Sheets("sheet2").Range("C26:BH43").copy Sheets("sheet1").Range("C22:BH39")

    End Sub


    The next data validation list is 20 cells lower in cell A42, and the code would be the same except for the macro name and copy/paste location:


    Sub Copy_Info2

    Sheets("sheet2").Range("C46:BH63").copy Sheets("sheet1").Range("C42:BH59")

    End Sub



    But I do not want to create a new macro for each list to paste 2 cells right of each list. I just want one macro that will paste 2 cells right of the active cell in sheet1, which should be the data validation cell.

    Thank you

  2. #2
    Forum Contributor
    Join Date
    09-09-2013
    Location
    California, USA
    MS-Off Ver
    MS 365 Subscription
    Posts
    130

    Re: VBA Copy from one sheet and paste two cells to the right from active cell on another s

    UPDATE


    I have got this code to work:

    Sheets("sheet2").Range("C46:BH63").copy
    Sheets("sheet1").Activate
    ActiveCell.Offset(0, 2).Select
    ActiveSheet.Paste

+ 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 Cell Range From Previous Sheet and Paste to Active Sheet
    By jtal in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-01-2013, 03:26 PM
  2. [SOLVED] Copy & Paste active row to Sheet 2 without cell borders
    By XxCMoneyxX in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-12-2013, 11:10 AM
  3. Copy active row and paste to specific cells on different sheet
    By XxCMoneyxX in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-27-2013, 03:03 PM
  4. [SOLVED] Active Cell Copy And Paste Sheet to Sheet
    By A.R.J Allan Jefferys in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 05-03-2006, 09:10 PM
  5. [SOLVED] Copy from active sheet and paste into new sheet using info from cell in active
    By Ingve in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-23-2006, 06:00 PM

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