Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 170
Default Random Ltters and Numbers

Hi Can someone help me please I need to grenerate a random 11 characters and
Numbers mixed I can do it with numbers but I haven't done it with letters,
has anybody done this kind of thing before any help would be much appreciated.
Thanks
Frank
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Random Ltters and Numbers

How about having all the letters and numbers in one column, a random number
in the next column. Sort on the random number column and then the top 11
rows will be your random 11 characters.

Chris


"Frank" wrote in message
...
Hi Can someone help me please I need to grenerate a random 11 characters
and
Numbers mixed I can do it with numbers but I haven't done it with letters,
has anybody done this kind of thing before any help would be much
appreciated.
Thanks
Frank



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 222
Default Random Ltters and Numbers

"Frank" wrote:

Hi Can someone help me please I need to grenerate a random 11 characters and
Numbers mixed I can do it with numbers but I haven't done it with letters,
has anybody done this kind of thing before any help would be much appreciated.
Thanks
Frank


One way:-

Sub RandomGenerate()
For a = 1 To 11
x = Int(Rnd * 2) 'decide whether number or character
If x = 1 Then
Cells(a, 1) = Chr(Int(26 * Rnd) + 65) 'character codes start
at 65
Else
Cells(a, 1) = Int(9 * Rnd)
End If
Next a
End Sub
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
Random Numbers excluding Previous Numbers Brad Excel Worksheet Functions 2 July 23rd 09 12:25 AM
getting numbers divisible by 4 from random numbers in ascending order ramana Excel Worksheet Functions 6 June 19th 07 06:41 PM
Can Excel pick random numbers from 1-300 and not repeat numbers? Julian Excel Discussion (Misc queries) 1 June 7th 06 07:17 AM
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


All times are GMT +1. The time now is 11:55 PM.

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"