Unique ID Number

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.
 
J

JE McGimpsey

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
 
S

StompS

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.....
 
Top