Increment by one.

  • Thread starter Thread starter Colin Hayes
  • Start date Start date
C

Colin Hayes

Hi

I suspect this is simple ....

I have an integer in C6.

I want to run a macro at the end of which this integer is increased by
1.

Can anyone supply the line of code which will do this?


Best Wishes
Drno
 
Sub Incrementby1()
Dim rng As Range
Set rng = Sheets("Sheet1").Range("C6")
rng.Value = rng.Value + 1
End Sub
 
Jason Morin said:
Sub Incrementby1()
Dim rng As Range
Set rng = Sheets("Sheet1").Range("C6")
rng.Value = rng.Value + 1
End Sub

Hi Jason

Thanks for getting back. It worked perfectly first time.

Thanks again

Drno
 
Back
Top