copy different cells from 1 sheet to another

  • Thread starter Thread starter Khalil Handal
  • Start date Start date
K

Khalil Handal

Is there a way to copy a range of non adjasent cells from one sheet to
another without moving back and forth between the 2 sheets?
i.e.
copy D15 from sheet1 to K17 in sheet2
copy G10 from sheet1 to M17 in sheet2
copy range starting E21 until first empty line from sheet1 to colomn I in
sheet2 starting the first empty line in that colomn.
copy range starting C21 until first empty line from sheet1 to colomn F in
sheet2 starting the first empty line in that colomn.
 
try this
Sub copyshttosht()'from source sheet
With Sheets("DestinationSheetName")
range("D15").copy .range("k17")
range("g10").copy .range("m17")

lr = .Cells(Rows.Count, "I").End(xlUp).Row + 1
Range("e21:e" & Cells(21, "e").End(xlDown).Row).Copy .Cells(lr, "I")

lr = .Cells(Rows.Count, "f").End(xlUp).Row + 1
Range("c21:c" & Cells(21, "c").End(xlDown).Row).Copy .Cells(lr, "f")

End With
End Sub
 
Thanks

Don Guillett said:
try this
Sub copyshttosht()'from source sheet
With Sheets("DestinationSheetName")
range("D15").copy .range("k17")
range("g10").copy .range("m17")

lr = .Cells(Rows.Count, "I").End(xlUp).Row + 1
Range("e21:e" & Cells(21, "e").End(xlDown).Row).Copy .Cells(lr, "I")

lr = .Cells(Rows.Count, "f").End(xlUp).Row + 1
Range("c21:c" & Cells(21, "c").End(xlDown).Row).Copy .Cells(lr, "f")

End With
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(e-mail address removed)
 
Back
Top