#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Unique ID

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Unique ID

I think your right...I can randomize the first few characters and that should
do it. I have several thousand users worldwide.

Thanks again.

Ron

"Stan Scott" wrote:

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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Filer for unique records and return all column data for unique rec bseeley Excel Discussion (Misc queries) 1 September 12th 09 12:17 AM
How to pick out unique components in a list with unique and common iksuinje Excel Discussion (Misc queries) 2 August 20th 08 09:57 PM
Attempting to sort unique/only count first record in each unique g MJW[_2_] Excel Discussion (Misc queries) 3 August 10th 07 02:56 PM
unique filter results in some non-unique records. Serials Librarian Excel Discussion (Misc queries) 2 May 26th 06 09:58 PM
Formulas for...1. Counting unique cells 2. Display unique contents J Excel Programming 0 April 23rd 04 09:20 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"