In column 1 ensure you stick in the following formula
=ROW(A2)
That will pretty much do what you want. Krompton is right, Access or any other database is better for this though.
Main Topics
Browse All TopicsHi,
I need help in creating an autonumber in Excel. It must automatically update when a row is added. It must be able to stay unique if a row is inserted and must not change if a row is cut/pasted.
Is this possible.
regards
Sharath
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Are the serial numbers the numbers from the asset like the system number assigned to a computer by the factory or do you "create" a random asset number? Are these assets from differing manufacturers? If you have something like a listing of all IT assets over x dollar amount and you are using the manufacturers serial number, although unlikely, it is possible that two numbers could be the same, preventing you from mataining Uinque numbers.
Basically you have a database. Truthfully I would put the minimal effort into setting up an Access table and import the information instead of making an Excel spread sheet work like one. Though if that's REALLY what you want let us know I'm sure we can put something together for you.
Can you list three or four rows of the information you keep (mask any sensitive info) and what you want it to do.
You posted ..."when i insert a row in the file it has to automatically change the serial no's which are there" what information is already there that needs to be changed? I would expect a new row to be blank.
Krompton
Hi,
thanks for the interset shown.
I have put in the details that i maintain.
1 C150 Arundhathy Manmidi Dev-hyd-pc427 R02616 Intel/IBM
2 C151 Sathyanaraynan Murthy Dev-hyd-pc454 R02606 Intel/IBM
3 C152 Bharath Dhraviam Dev-chen-pc399 R5196 IBM 8771
4 C153 S Mohamed Bakkrudeen Dev-chen-pc008 R4970 IBM 8123
5 C154 Amardeep Ashok Dev-chen-pc1565 R3107 Intel GIGA
6 C155 Peter Jose Dev-chen-pc1096 R2923 IBM 8175
Please copy these details to a excel file.
I am taking about the first colom the serial no colum.That has to change automatically when i delete a row or insert a row.
Regards
Sharath
In your original post you stated ..."It must be able to stay unique if a row is inserted and must not change if a row is cut/pasted." (see B below) but in your last post you said ..."That has to change automatically when i delete a row or insert a row." (see A below)
I'm confused here?!?
Are the Cxxx numbers actual Serial Numbers or are they just self assigned Sequence Numbers?
From your post:
1 C150 Arundhathy Manmidi Dev-hyd-pc427 R02616 Intel/IBM
2 C151 Sathyanaraynan Murthy Dev-hyd-pc454 R02606 Intel/IBM
3 C152 Bharath Dhraviam Dev-chen-pc399 R5196 IBM 8771
4 C153 S Mohamed Bakkrudeen Dev-chen-pc008 R4970 IBM 8123
5 C154 Amardeep Ashok Dev-chen-pc1565 R3107 Intel GIGA
6 C155 Peter Jose Dev-chen-pc1096 R2923 IBM 8175
If you were to delete ROW 4 which of the following is what you want left?
A) Cxxx numbers are redone
1 C150 Arundhathy Manmidi Dev-hyd-pc427 R02616 Intel/IBM
2 C151 Sathyanaraynan Murthy Dev-hyd-pc454 R02606 Intel/IBM
3 C152 Bharath Dhraviam Dev-chen-pc399 R5196 IBM 8771
4 C153 Amardeep Ashok Dev-chen-pc1565 R3107 Intel GIGA
5 C154 Peter Jose Dev-chen-pc1096 R2923 IBM 8175
OR B) Cxxx numbers are left unchanged except for the deleted row's number being deleted as well
1 C150 Arundhathy Manmidi Dev-hyd-pc427 R02616 Intel/IBM
2 C151 Sathyanaraynan Murthy Dev-hyd-pc454 R02606 Intel/IBM
3 C152 Bharath Dhraviam Dev-chen-pc399 R5196 IBM 8771
4 C154 Amardeep Ashok Dev-chen-pc1565 R3107 Intel GIGA
5 C155 Peter Jose Dev-chen-pc1096 R2923 IBM 8175
B is what I would think you would want but I don't know. If B IS what you want would the number C153 be reused?
Krompton
If you have a Column Header Row i.e.:
(Excel row #)
1 S/N C# User (etc...)
2 1 C150 Arundhathy Manmidi Dev-hyd-pc427 R02616 Intel/IBM
3
Enter the formula "=(ROW()-1)" (no quotes) in each cell with data in column A.
If you do not use the first row as a column header row simply drop the "-1" from the end.
Krompton
Business Accounts
Answer for Membership
by: KromptonPosted on 2007-02-07 at 05:02:20ID: 18484366
FYI: This is probably not the best TA for this question.
It's feasible, but why not use M$ Access or SQL? Unique numbers for a row sounds more like a database table Primary Key field. You would have to develop a Macro or VBA procedure which of course is what you're asking help with, but when the Primary Key setting in something like Access is already built why bother?
What exactly are you trying to accomplish?
Krompton