Is there any "autonumber" in Excel?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I would like to create a table with autonumber field in Excel worksheet.
This field will be similar to Microsoft access while enter a new customer or
Item a new entry is made by automatically.

Thank you
 
Various ways exist. To emulate Autonumber, you'd want to get the number of
the worksheet's final used row. A simple method that doesn't rely on event
handlers is this formula:

=IF(NOT(ISBLANK(B1)),ROW(),"")

entered into cell A1 and copied/pasted down as far as needed; it assumes
that new customers/items have data in column B.

If you're comfortable with VBA and worksheet_change events, there are
(possibly) stronger methods, involving statements such as:

LastRow = ActiveSheet.Cells(65536, 1).End(xlUp).Row

to get the number of the final row that contains a value in column A of the
active worksheet.
 

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

Back
Top