Increment by one.

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
 
J

Jason Morin

Sub Incrementby1()
Dim rng As Range
Set rng = Sheets("Sheet1").Range("C6")
rng.Value = rng.Value + 1
End Sub
 
C

Colin Hayes

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
 
Top