Unique ID Number

  • Thread starter Thread starter StompS
  • Start date Start date
S

StompS

I would to assign a unique (sequential) ID # to a cell when that cell is
selected somehow. Once that number is selected then the next time a cell
formatted that way is selected, it gets the next number in the sequence.
Thank you.
 
Take a look here for sequential numbers:

http://www.mcgimpsey.com/excel/sequentialnums.html

You don't say what "cell formatted that way" means (e.g., Numberformat?
Font characteristics? Cell background?), you may be able to use a
Worksheet_SelectionChange() event:

Private Sub Worksheet_SelectionChange( _
ByVal Target As Excel.Range)
With ActiveCell
If .Interior.ColorIndex = 3 Then _
.Value = NextSeqNumber
End With
End Sub
 
Sorry,

What I meant was that, cells in that column, which represent a unique ID
number, and would be somehow formatted so Excel knows that those are the
cells that need this option. This is just to give a unique number to each
set of data.....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top