michael32
08-17-2022, 06:20 AM
Hi,
could you please help me with copy from one sheets to another sheet in one workbook. I create this macro for it:
- I have here one problem if all variable from y is done than the variable z is running +2 e.g.:
....sheets("employees").cells(y "8",9).copy sheets("time_data_01").cells(2,4).offset(z "8",0)
....sheets("employees").cells(y "3",9).copy sheets("time_data_01").cells(2,4).offset(z "10",0)
Sub testing()
Dim y As Long
Dim z As Long
For z = 1 To 42
For y = 3 To 8
Sheets("employees").Cells(y, 9).Copy Sheets("Time_data_01").Cells(2, 4).Offset(z, 0)
z = z + 1
Next y, z
End Sub
could you please help me with copy from one sheets to another sheet in one workbook. I create this macro for it:
- I have here one problem if all variable from y is done than the variable z is running +2 e.g.:
....sheets("employees").cells(y "8",9).copy sheets("time_data_01").cells(2,4).offset(z "8",0)
....sheets("employees").cells(y "3",9).copy sheets("time_data_01").cells(2,4).offset(z "10",0)
Sub testing()
Dim y As Long
Dim z As Long
For z = 1 To 42
For y = 3 To 8
Sheets("employees").Cells(y, 9).Copy Sheets("Time_data_01").Cells(2, 4).Offset(z, 0)
z = z + 1
Next y, z
End Sub