#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Random gen

hi all,

ok what am looking to do is create a random unique id from a set lis
of characters the characters range A1:A37 the length of the id i
shortest 5 and longest 12

Thanks in advanc

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default Random gen

What do you want to compare it against to check that it is unique?

pauluk < wrote:
hi all,

ok what am looking to do is create a random unique id from a set list
of characters the characters range A1:A37 the length of the id is
shortest 5 and longest 12

Thanks in advance


---
Message posted from http://www.ExcelForum.com/


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Random gen

the value is to placed in column B so thats were it would compare

First id in cell B1

then when it creates the next one which will be b2 it compares firs
with range B:

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Random gen

Why not divide up your values to correspond to the date and time or think up
an algorithm that would generate an id based on the date and time. Then you
would be sure it is unique.

--
Regards,
Tom Ogilvy

"pauluk " wrote in message
...
hi all,

ok what am looking to do is create a random unique id from a set list
of characters the characters range A1:A37 the length of the id is
shortest 5 and longest 12

Thanks in advance


---
Message posted from http://www.ExcelForum.com/



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Random gen

or create a GUID for each item, bit long, but un ique.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Tom Ogilvy" wrote in message
...
Why not divide up your values to correspond to the date and time or think

up
an algorithm that would generate an id based on the date and time. Then

you
would be sure it is unique.

--
Regards,
Tom Ogilvy

"pauluk " wrote in message
...
hi all,

ok what am looking to do is create a random unique id from a set list
of characters the characters range A1:A37 the length of the id is
shortest 5 and longest 12

Thanks in advance


---
Message posted from http://www.ExcelForum.com/







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Random gen

i just need to knwo how to generate id form ath range.

I can check for duplicates another wa

--
Message posted from http://www.ExcelForum.com

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Random gen

Paul,

here is one way to get a unique id by a column

=RANK(E1,$E$1:$E$10)+COUNTIF(E1:$E$1,E1)-1

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"pauluk " wrote in message
...
i just need to knwo how to generate id form ath range.

I can check for duplicates another way


---
Message posted from http://www.ExcelForum.com/



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default Random gen

See the Excel/Tutorials/Random Selection page of my web site for a
bunch of different methods.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article , pauluk
says...
hi all,

ok what am looking to do is create a random unique id from a set list
of characters the characters range A1:A37 the length of the id is
shortest 5 and longest 12

Thanks in advance


---
Message posted from http://www.ExcelForum.com/


  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Random gen

What i want is this

i want to generate a random word or name from

a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y, z,1,2,3,4,5,6,7,8,9,0,

--
Message posted from http://www.ExcelForum.com

  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default Random gen

Public Function rndString$()
Const ALPHNUM = "abcdefghijklmnopqrstuvwxyz1234567890"
Dim pos%, i%, res$
For i% = 1 To 12
If i% < 6 Or Rnd() < 0.5 Then
pos% = 27 * Rnd() + 1
res$ = res$ & Mid$(ALPHNUM, pos%, 1)
End If
Next i%
rndString = res$
End Function


pauluk < wrote:
What i want is this

i want to generate a random word or name from

a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y, z,1,2,3,4,5,6,7,8,9,0,_


---
Message posted from http://www.ExcelForum.com/




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
Sorting random Data created from a random formula Six Sigma Blackbelt Excel Discussion (Misc queries) 1 September 11th 08 11:03 PM
Non-random numbers generated by excel's data analysis random gener Allie Excel Worksheet Functions 10 September 17th 05 06:19 AM
Non-random numbers generated by excel's data analysis random gener Harlan Grove Excel Discussion (Misc queries) 2 September 13th 05 04:06 PM
How do I find random number in list of random alpha? (Position is. jlahealth-partners Excel Discussion (Misc queries) 0 February 8th 05 05:31 PM
Random Nerine Excel Worksheet Functions 3 November 1st 04 10:45 AM


All times are GMT +1. The time now is 09:23 AM.

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

About Us

"It's about Microsoft Excel"