Automatic Generation of record numbers

DPChristman

Board Regular
Joined
Sep 4, 2012
Messages
126
I am trying to create a spreadsheet of records that will automatically numerate cases.

There will be up to 1,000 records created annually.

Our existing process is a =MAX +1 formula, which requires numbers to be entered manually for each case (and is subject to human error)

Normally this would be an easy thing to do with a simple formula. However, there is a catch.

As the data is entered over time, the spreadsheet may be sorted by any number/combination of 85 columns.

If I was the only user, I could create an easy work around by converting previous case numbers to values only.

However, there will be multiple users of the spreadsheet, and most have very limited PC and excel skills.

Accidentally reassigning a case number to the wrong entry is an unacceptable risk.

Any thoughts?
 

KenDue

New Member
Joined
Oct 31, 2016
Messages
48
Could you have a text box named "Add New Record" with a Macro assigned to it that would go to the next blank row, type in your formula of =MAX+1, then copy and paste the result back over the formula "As Value"?

All your numbers would be values, and less susceptible to inadvertent changes.
 

JLGWhiz

Well-known Member
Joined
Feb 7, 2012
Messages
11,253
Office Version
2013
Platform
Windows
If the document numbers do not have to be absolutely consecutive, but remain sequential, then you could use something similar to the military logistics document numbering method.
Code:
Range("A1") = Format(Now, "YYMMDDHhnnss")
give you a number that looks like this: 161125171915, and won't be duplicated for the next hundred years. You could set it up with a worksheet selection change event macro that would assign the number when a user clicks in the document number box. The military uses a Julian date plus four digit serial number which they restart daily because it only gives them 9999 unique daily numbers.

<tbody>
</tbody>
 
Last edited:

Forum statistics

Threads
1,081,535
Messages
5,359,365
Members
400,525
Latest member
swwber

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top