Monday 19 December 2016

vba - Copy a range and paste each cell value in the range to a specific new cell in excel

I basically need to clean up this code that I made up myself to save me from repeatedly copy and pasting! Please advise?



Sub cp()

Worksheets("copy").Select
Range("b2").Select
Selection.copy
Range("b7").Select
ActiveSheet.Paste
Range("c2").Select
Selection.copy
Range("e7").Select
ActiveSheet.Paste
Range("d2").Select

Selection.copy
Range("h7").Select
ActiveSheet.Paste
Range("e2").Select
Selection.copy
Range("k7").Select
ActiveSheet.Paste
end sub

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...