Thread: Unique ID
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Stan Scott Stan Scott is offline
external usenet poster
 
Posts: 34
Default Unique ID

A common way to do this is to use the date and time functions, along with
some prefix, like this:

="SS" & year(now) & month(now) & day(now) & hour(now) & minute(now) &
second(now)

Each ID assigned will obviously be unique.

Stan Scott
New York City

"Ron Rasmussen" <Ron wrote in message
...
I am trying to insert a unique ID for each row in multiple sheets that are
not connected but the data will later be combined (so I need the unique ID

to
be unique).

I thought I would use the following code:
Dim GId As Guid = Guid.NewGuid() but I get an error message that it is not
supported in VBA.

I'm sure many people have this same problem and there must be a preferred
method.

I would appreciate any advise.

Ron