I have several sheets in my workbook that I want to copy a range of data from H5:J(lastrow). Can someone help on my code below. The intention is to run the macro on the activesheet.
Thank you.
VBA Code:
Sub CopyData()
Dim a As Integer
a = ActiveSheet.Range("H5" & Rows.Count).End(xlUp).Row
ActiveSheet.Range("H5:J" & a).Copy
ActiveSheet.Range("A5").PasteSpecial xlPasteValues
End Sub
Thank you.