View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
Peter T
 
Posts: n/a
Default Unique identifier

Hi Steve,

To cover all the scenarios you mention might be impractical, but for what
purpose/usage do you need unique row identifiers, in addition to the fact
you can always read row numbers.

Maybe you could define worksheet level named ranges, these would move as you
insert rows though would end up with meaningless names for deleted ranges
(#REF). Would you want 10k names though (but much better than 10k comments).

If you were "allowed" to insert an extra column (hidden perhaps) populate
with row numbers as values. Store the highest number somewhere (a cell or
named formula). To cater for row inserts & new rows at the end, in selection
and/or change events check the identifier cell has a value. If not increment
the stored highest number and place same as the new identifier.

But with the limitations imposed by your client you are a bit strapped!

Regards,
Peter T

"Steve Barnett" wrote in message
...
I have a spreadsheet (Excel 2000) that contains around 10,000 rows. I now
need to be able to identify each row via a unique identifier, but am

having
trouble working out what to do when new rows are added or when existing

rows
are copied and paste.

New rows and copied rows should get new unique identifiers, but I can see

no
way of doing this. Does anyone have any suggestions? There is nothing

unique
about the data that I can hang on to and the "SheetChanged" event does not
fire for inserted rows in Excel 2000.

This spreadsheet is owned by one of our clients, so I can't add new
worksheets or columns to the existing workbook - I can just add cell
comments (unless you have a better suggestion).

Can anyone help?

Thanks
Steve