Macro to increase cell value by 1 each time button clicked

F

fozzer

Hi,

does anyone know what code to include in a macro so that a given cel
in increase by 1 each time the macro is run. The macro will b
clearing all of the data fields so that the counter goes on to the nex
data entry i.e data is entered onto quote 23, macro clears all dat
fields and moves on to quote 24 and so on.

Thanks
Pet
 
M

mudraker

' test cell a1
if isnumeric(range("a1")) then
range("a1").value=range("a1").value+1
end i
 
D

Don Guillett

does anyone know what code to include in a macro so that a given cell
in increase by 1 each time the macro is run.

Sub addone()'assign to a button
Range("d2") = Range("d2") + 1
End Sub
 
Top