ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I add an auto number to a worksheet (https://www.excelbanter.com/excel-discussion-misc-queries/10900-how-do-i-add-auto-number-worksheet.html)

peterm

How do I add an auto number to a worksheet
 
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

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

peterm wrote:

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


--

Dave Peterson


All times are GMT +1. The time now is 09:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com