Hello All,
I am stuck in the last part of macro on copying 2 cells which contain an ID and Visit number to a range where the ID and Visit number need to be listed every time for each data line (the amount of data lines here will vary).
Dim IDVisit As Range
Dim CopyRange As Range
Dim FinalRaw As Long
Dim rngTemp As Range
FinalRaw = wsR.Cells(Rows.Count, 5).End(xlUp).Cells
Set IDVisit = wsO.Range(Cells(1, 3), Cells(1, 4))
Set IDSPSS = wsR.Range(Cells(2, 1), Cells(FinalRaw, 1))
For Counter = FinalRaw To 1 Step -1
Set rngTemp = ID.Cells(FinalRaw)
For i = 1 To FinalRaw
IDSPSS.Value = rngTemp.Value
Next
Next
End Sub
I did this copying a post I saw. But I think this is more complicated than it needs to be. I basically need 2 cells copied multiple times on another workbook for each data line that is present.
FYI. the workbooks etc. are already declared earlier in the Macro.
Thanks in advance!
Bookmarks