ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   A unique ID for each row, also automatically after inserting a new row. (https://www.excelbanter.com/excel-programming/454136-unique-id-each-row-also-automatically-after-inserting-new-row.html)

Ronald[_4_]

A unique ID for each row, also automatically after inserting a new row.
 
Hello,

We have a need to use unique identifiers for product attributes sheet.
The data is already filled in and it goes to specific users to validate it.
WE don't want to lose the original data but if change should apply enter a new record below with the modified data.

The unique ID is on column A and it's not calculated but entered once at the creation of the sheet. This cells are protected to ensure there are not modified.

The issue is that if a user needs to modify the data and creates a new record below the unique ID is not filled in automatically in the needed range.

In the example below you can see a very simple example of what I mean,
1) data before insert
2) Wished layout after user updates a product.
3) Wished layout after user updates the same product in a next review.


Key issue (and question) is that we want to apply a sub number to the, let's say, parent row. The format is not relevant. As long as it can be identified/traced as on the example below.

Do you have a solution, example or even hint for me to achieve this?

Best regards,

Ronald.

PS: I've also post it in microsoft.public.excel.misc but doing it also here in case it may be possible to solved with programming.
Please have in mind the spoken cells (unique id) are protected....
__________________________________________________ ________

1) Before insert row

A B C D E F
ID # Product Qty in box Size box Color box Brand
1 Hammer 5 30x15x40 Grey Sma****
2 Screwdriver 12 25x18x22 Blue Long John
3 Calculator 15 40x35x25 Green I know it
4 Pen 50 22x20x30 Blue PenLight


2) After insert row

ID # Product Qty in box Size box Color box Brand
1 Hammer 5 30x15x40 Grey Sma****
2 Screwdriver 12 25x18x22 Blue Long John
2.1 Screwdriver 11 25x18x22 Blue Long John
3 Calculator 15 40x35x25 Green I know it
4 Pen 50 22x20x30 Blue PenLight


3) After inserting another one later on

ID # Product Qty in box Size box Color box Brand
1 Hammer 5 30x15x40 Grey Sma****
2 Screwdriver 12 25x18x22 Blue Long John
2.1 Screwdriver 11 25x18x22 Blue Long John
2.2 Screwdriver 11 25x18x22 Purple Long John
3 Calculator 15 40x35x25 Green I know it
4 Pen 50 22x20x30 Blue PenLight

Living the Dream

A unique ID for each row, also automatically after inserting anew row.
 
Hi Ronald

Firstly, Is this meant to be a form of Inventory Control for Inwards & Sales/Dispatch?? If so, this would be far more efficient if it was in a database, that aside.

Your structure is ( IMO ) slightly skewed, here's why. It would be better served as follows:

Category No:
Product Code:
Item Code:
Box Qty:
Box Size:
Box Color:
Brand:
Supplier:
Movement Type: ( In / Out )
Date:

The reason for the date is it covers the date/time when the product was added to, or moved out of stock.

I could be way off the mark here, and someone else may have something more to your liking. Personally myself, an MSAccess Database or similar DB like MYOB ( which has in/out stock control ) may be a better solution as it keeps all your records in one container where all activity is recorded.

HTH

Cheers
Mark.

GS[_6_]

A unique ID for each row, also automatically after inserting a new row.
 
or similar DB like MYOB

It was excellent for inventory management in its day, but it's long ago now
been discontinued! An Excel-based model could easily imitate these features,
but would be a daunting task to achieve nevertheless!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


All times are GMT +1. The time now is 05:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com