Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How automatically increment an id # in Excel

Status
Not open for further replies.

mlm823

Programmer
Oct 29, 2003
39
0
0
US
Hello

So I've been requested to work on a project track sheet which will be interactively online for people to use.

The clients want the job number to automatically increment but I'm not quite sure how to do that since it will be online interactively.

Any suggestions?

Thanks,

Maranda
 
Perhaps the AutoFill method ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I think the safest way is a file outside of the application that is opened/read/written/closed at each instance.

_________________
Bob Rashkin
 
Thanks everyone for the replies so far. If I make the numbers stored in an outside application what would I need to do to read that file? And by written you mean that it will write the field in the Excel file?

Question though if it is an interactive file then would that cause issues with getting the id number from another file?

Thanks,
 
What I suggest is, say, a text file. Excel (through a macro) would open the file, read the last ID number, increment that number and assign it to the current instance, write that (now) latest ID number back to the file, and close it.

_________________
Bob Rashkin
 
Do you know if I could do it based on each time you go to a new row? So then it could stay open?

From what you are saying I should force them to open the file each time rather than leaving it open?

Thanks,
 
It sounds like something that would use the SheetChange event, maybe. I'm not really up on events.

Are you saying that multiple users are accessing the same instance of this spreadsheet at the same time? How is that happening?

_________________
Bob Rashkin
 
Thanks for all the assistance -- but I've talked with them and it won't be needed -- the job number will be an auto-filled cell that I've done ... for it will be different at all times.. And now we are going to make the project number be a pull-down.. so now I'm trying to figure out how to make the pull-down since it will go from 0001-9999....and that is a bunch of rows to pre-fill -- if you have any suggestions I would really appreciate it.

Thanks again...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top