I have this code and first part is all correct it does the copy and past from one sheet to another, but 2nd part of copy and paste is not working, there is no error and it is not even copying and pasting the data.
any suggestions.
any suggestions.
VBA Code:
Sub CurrenttrackertoDB()
'''''''''''''''''''''''''''''''''''''''''''''''''''
'this is conver the current tracker to
'DB
'
''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim wsSource As Worksheet
Dim wsTarget As Worksheet
Dim iSourceLastRow As Long
Dim iTargetLastRow As Long
Set wsSource = Worksheets("Tracker - RawData")
Set wsTarget = Worksheets("DB - RawData")
iSourceLastRow = wsSource.Cells(wsSource.Rows.Count, "A").End(xlUp).Row
iTargetLastRow = wsTarget.Cells(wsTarget.Rows.Count, "A").End(xlUp).Offset(1).Row
'Copy data from the source and Paste in the destination
wsSource.Range("A7:AZ7" & iSourceLastRow).Copy wsTarget.Range("A" & iTargetLastRow) 'this 1st part is all correct
wsSource.Range("BK7" & iSourceLastRow).Copy wsTarget.Range("BA" & iTargetLastRow) 'this part of code is not working
End Sub
Last edited by a moderator: