hendrikbez
Board Regular
- Joined
- Dec 13, 2013
- Messages
- 95
- Office Version
- 2021
- Platform
- Windows
I have 5 sheets. on my lat sheet I want to copy all info form sheet1 - 4 to sheet 5, did do a macro, but need help on how to do the following
on sheet 1 I can have info for about 2 to 12 rows
on sheet 2 I can have info for about 2 to 15 rows
on sheet 3 I can have info for about 2 to 120 rows
on sheet 4 I can have info for about 2 to 5 rows
I want to when I press the 2,3 or 4 macro it must start just after the last one of the sheet before it.
I am doing the first one, then drag down till I have lal 4 or 5 of first sheet in. Then I want to start the second one on the next row
on sheet 1 I can have info for about 2 to 12 rows
on sheet 2 I can have info for about 2 to 15 rows
on sheet 3 I can have info for about 2 to 120 rows
on sheet 4 I can have info for about 2 to 5 rows
I want to when I press the 2,3 or 4 macro it must start just after the last one of the sheet before it.
I am doing the first one, then drag down till I have lal 4 or 5 of first sheet in. Then I want to start the second one on the next row
Code:
Sub get1all()
'
' get1all Macro
'
'
ActiveCell.FormulaR1C1 = "=UnixO!R[5]C[-1]"
Range("D4").Select
ActiveCell.FormulaR1C1 = "=UnixO!R[5]C[-2]"
Range("E4").Select
ActiveCell.FormulaR1C1 = "=UnixO!R[5]C[-2]"
Range("F4").Select
ActiveCell.FormulaR1C1 = "=UnixO!R[5]C[-1]"
Range("F4").Select
End Sub
Code:
Sub get2all()
'
' get2all Macro
'
'
Range("B8").Select
ActiveCell.FormulaR1C1 = "=UnixN!R[1]C[-1]"
Range("D8").Select
ActiveCell.FormulaR1C1 = "=UnixN!R[1]C[-2]"
Range("E8").Select
ActiveCell.FormulaR1C1 = "=UnixN!R[1]C[-2]"
Range("F8").Select
ActiveCell.FormulaR1C1 = "=UnixN!R[1]C[-1]"
Range("F9").Select
End Sub
Last edited: