![]() |
#2
|
|||
|
|||
![]()
This cannot be done with a field, automatic numbering is sequential by design; vba would be required.
In Excel I accomplished this by a cell at the bottom of the column that has the ID numbers which says MAX of the column +1. I then use a macro to insert a new row above the current one and put the value found in the bookmark for the formula in the ID column for the new row. Here is the vba code to assign the new number to column Q of the new row: Code:
' Insert new row above selection ' Dim lRow As Long lRow = Selection.Row Selection.EntireRow.Insert ' ' Assign Case Number ' Dim lNext As Long lNext = Range("Next_Number").Value Cells(lRow, "Q").Value = lNext I prefer using Excel for data rather than Word and wouldn't know how to get the MAX function to work in Word. I'm sure that something could be done using vba. |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
jrt | Excel Programming | 1 | 04-16-2015 01:46 PM |
Increment Numbers | Darbsp | Word | 3 | 03-10-2015 05:25 AM |
![]() |
spthomas | Word | 12 | 12-16-2013 05:23 PM |
![]() |
SASE1984 | Word | 1 | 02-10-2012 01:06 PM |
Increment Numbers Help | Jazz43 | Word | 2 | 07-30-2010 02:48 AM |