How do I add an auto number to a worksheet

G

Guest

Can I add an auto number to a work sheet
or a button to generate a number which increases by 1 each time.
Office 2000
 
D

Dave Peterson

You could create a macro and assign it to a button from the Forms toolbar
(placed on that worksheet).

Option Explicit
sub testme01()
with activesheet
if isnumeric(.range("a1").value) then
.range("a1").value = .range("a1").value + 1
end if
end with
end sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top