Need help for MACRO

Copper Contributor
I have a macro that will select the cell H3 and will automatically add 1 as the content then select C4 as the end process. Can someone teach how to do the same macro for every rows? I want the same code in every row if I use the macro. Please help me.
1 Reply

Hi @Aonotsukune0622 

Maybe this would work. The first one works with absolute cells, the later works for relative cells. 

 

Sub Macro1()
Tem_value = Range("H3").Value + 1
Range("H3").Select
ActiveCell.FormulaR1C1 = Tem_value
Range("C4").Select
End Sub


Sub Macro2()
Tem_value = ActiveCell.Offset(0, 6).Value + 1
ActiveCell.Offset(0, 6).Range("A1").Select
ActiveCell.FormulaR1C1 = Tem_value
ActiveCell.Offset(1, -6).Range("A1").Select
End Sub