I am trying to put results from sheet a to different sheets accordingly.
Sub update()
Dim cell As String, sheet As String, rcdate As String, row As Integer
row = 2
ThisWorkbook.Sheets("Auto Generate V2").Activate
cell = CStr(ThisWorkbook.Sheets("Auto Generate V2").Cells(row, 10).value)
Do While cell <> ""
sheet = Left(cell, 10)
rcdate = Right(cell, 3)
ThisWorkbook.Sheets(sheet).Activate
ThisWorkbook.Sheets(sheet).Range(rcdate).value = ThisWorkbook.Sheets("Auto Generate V2").Cells(row, 5).value
row = row + 1
cell = CStr(ThisWorkbook.Sheets("Auto Generate V2").Cells(row, 10).value)
Loop
End Sub
The error is at ThisWorkbook.Sheets(sheet).Range(acdate).value = ThisWorkbook.Sheets("Auto Generate V2").Cells(row, 5).value How do I solve it
row As Integer
torow As Long
. – user4039065