Hi everyone,
This is my first post here and I usually do a research first and find my answers based on that but I couldn't find anything on this one. My company recently updated our excel to 2013 version and the macro that I've been using hasn't been working since then. I use the macro to convert our timesheets into an importable format. Basically what the macro does is take all the timesheets from a folder, open them, delete lines with "0" value and consolidate (copy paste) them into a new worksheet. All the other macros are working fine except for the last one which is the Copy and pasting of values for the first 900 lines.
Sub copy_3()
'
'Copy paste value of 900 first lines
Dim sourceRange As Range
Dim destrange As Range
Dim Lr As Long
Application.ScreenUpdating = False
Lr = LastRow(Dest.Sheets(2)) + 1 <- this was the first line that I was having trouble with but figured it out
Set sourceRange = Sheets(2).Rows("1:900")
Set destrange = Dest.Sheets(2).Rows(Lr) <-Then this is where I got stuck
sourceRange.Copy
destrange.PasteSpecial xlPasteValues, , False, False
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub
I've attached a sample of our timesheet and the macro that I'm using. If this doesn't work I'm thinking of just merging all the timesheets into one worksheet and manually delete the lines I don't need.![]()
Thanks everyone!!
Bookmarks