+ Reply to Thread
Results 1 to 19 of 19

copy-paste-selected-cell-range-another-sheet

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: copy-paste-selected-cell-range-another-sheet

    Hi,
    Just one more question may I ask.
    I know this is closed as solved.
    If I want to include other sheets , what will I write??
    Current Code
    Sub test()
     
     'Turn off screen flashing for speed
    Application.ScreenUpdating = False
     
    With Worksheets("sheet1")
        Sheets("sheet2").Range("C14:K56").Value = .Range("A2:I45").Value
        Sheets("sheet2").Range("L14:L56").Value = .Range("L2:L45").Value
        Sheets("sheet2").Range("M14:M56").Value = .Range("M2:M45").Value
    End With
    
     'Resume screen updates
    Application.ScreenUpdating = True
    
    End Sub
    I also want to include copying From
    sheet3 to sheet2 ( From sheet3 A2:E6  to sheet2 J58:M62)
    I tried to write and I am not going anywhere.
    Any help please
    Regards

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

    Re: copy-paste-selected-cell-range-another-sheet

    Now added your new condition in the below code and I hope now the code is easier for you to make changes on your own

    Sub test()
     
     'Turn off screen flashing for speed
    Application.ScreenUpdating = False
     
    
    Sheets("sheet2").Range("C14:K56").Value = Sheets("sheet1").Range("A2:I45").Value
    Sheets("sheet2").Range("L14:L56").Value = Sheets("sheet1").Range("L2:L45").Value
    Sheets("sheet2").Range("M14:M56").Value = Sheets("sheet1").Range("M2:M45").Value
    Sheets("sheet2").Range("J58:M62").Value = Sheets("sheet3").Range("A2:E6").Value
    
     'Resume screen updates
    Application.ScreenUpdating = True
    
    End Sub


    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

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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