insert row and automatically generate field in new row

J

JStange

I have a project plan that I'm storing in Excel. There are IDs assigned to
tasks that are alphabetical and numerical. For example:

A-1, A-2, A-3...

When a new row is insterted, is there a way to automatically generate the
next ID for the new task?

Thanks for any help that can be provided!
 
J

Joel

The way this is normally done is to add a Control Button to the worksheet
that will do the insert operation. The control button will run a macro that
will insert and add the New ID Number.
 
J

JBeaucaire

The function you may want to look into is the builtin LIST function. An Excel
"list" copies down the formulas from the last row whenever you start a new
entry in your list. You would need to make your ID numbers formulaic.

For instance, use a custom Number format for column A. You enter a 1 in cell
A2 and then format the cell using custom Number format:

"A-"#

So the cell value is really only 1, but it displays as A-1.

Now in cell A3, use a formula to increment:

=A2+1

If you apply the same custum number format, it will display as A-2.

Copy that down to the rest of your current/existing entries.

Now, activate the LIST. Highlight the ENTIRE table of data, including the
row of "titles" usually found at the top.

Then press CTRL-L and the Create List box will appear.
Click on [x] My list has headers, then OK.

A blue box will appear around your table of data indicating the LIST is
active.

At the bottom of the list you will see a * in the empty row, if you type
data in any of the cells, all formulas from the remaining cells above will
copy down and that row will become a permanent part of the "list".

Give it a try, or read up on it.
 
Top