PDA

View Full Version : [SOLVED:] Directly Copy A Range from One Sheet to Another



aerodoc
03-20-2014, 10:08 PM
I want to directly copy a range from one sheet to another. This is a current solution, but it has some issues:


Range(Sheet1.Cells(1, 1), Sheet1.Cells(5, 5)).Copy
Sheet2.Range("A1").PasteSpecial xlPasteValues

I want to do something more like this, but it does not work as is:

Range(Sheet1.Cells(1, 1), Sheet1.Cells(5, 5)) = Range(Sheet2.Cells(1, 1), Sheet2.Cells(5, 5))

mancubus
03-20-2014, 11:55 PM
perhaps something like this:
Range(Sheet2.Cells(1, 1), Sheet2.Cells(5, 5)).Value = Range(Sheet1.Cells(1, 1), Sheet1.Cells(5, 5)).Value

snb
03-21-2014, 03:54 AM
Sheet2.cells(1,1).resize(5,5)=Sheet1.cells(1,1).resize(5,5).Value