Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Tayo
 
Posts: n/a
Default How can I generate random characters in Excel

How can I generate random characters (both letters and numbers) into
different cells (both rows & columns) at he same time in excel?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Andrew Taylor
 
Posts: n/a
Default How can I generate random characters in Excel

Put all the possible characters in a cell, and name it as "list".
Then
=MID(list,1+INT(RAND()*LEN(list)),1)
will give a random character from the list. Use as many of these
as you need.

Andrew

Tayo wrote:
How can I generate random characters (both letters and numbers) into
different cells (both rows & columns) at he same time in excel?


  #3   Report Post  
Posted to microsoft.public.excel.misc
Daniel CHEN
 
Posts: n/a
Default How can I generate random characters in Excel

Try the following formula:

=CHAR(RANDBETWEEN(32,126))

which generates a random char whose ascii code is between 32 and 126.
Please note that 32 corresponding to space.


--
Best regards,
---
Yongjun CHEN
=================================
XLDataSoft - Data Analysis Expert, Excel/VBA Specialist
- - - - www.XLDataSoft.com - - - -
Free Excel-Based Data Processing Tool is Available for Download

=================================
"Tayo" wrote in message
...
How can I generate random characters (both letters and numbers) into
different cells (both rows & columns) at he same time in excel?



  #4   Report Post  
Posted to microsoft.public.excel.misc
Tayo
 
Posts: n/a
Default How can I generate random characters in Excel

Is the word 'list' in the formular the name of the header for the list? The
formular is not working. It's returning a #NAME? error. FYI, I am using
Excel 2003.


"Andrew Taylor" wrote:

Put all the possible characters in a cell, and name it as "list".
Then
=MID(list,1+INT(RAND()*LEN(list)),1)
will give a random character from the list. Use as many of these
as you need.

Andrew

Tayo wrote:
How can I generate random characters (both letters and numbers) into
different cells (both rows & columns) at he same time in excel?



  #5   Report Post  
Posted to microsoft.public.excel.misc
Andrew Taylor
 
Posts: n/a
Default How can I generate random characters in Excel

"list" is an Excel Name for the cell containing the list of characters.

You could use a cell reference instead, e.g.:

=MID(A1,1+INT(RAND()*LEN(A1)),1)

where A1 contains (say)
1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMN OPQRSTUVWXYZ


Tayo wrote:
Is the word 'list' in the formular the name of the header for the list? The
formular is not working. It's returning a #NAME? error. FYI, I am using
Excel 2003.


"Andrew Taylor" wrote:

Put all the possible characters in a cell, and name it as "list".
Then
=MID(list,1+INT(RAND()*LEN(list)),1)
will give a random character from the list. Use as many of these
as you need.

Andrew

Tayo wrote:
How can I generate random characters (both letters and numbers) into
different cells (both rows & columns) at he same time in excel?






  #6   Report Post  
Posted to microsoft.public.excel.misc
Tayo
 
Posts: n/a
Default How can I generate random characters in Excel

Thanks Andrew but I have some other questions:

(1) How can I make sure that the characters generated are not repeated in
any of the cells?

(2) Some cells returns null characters while some others return characters
whose length is less than the specified length in LEN. How can I control the
length of characters the code will return?

Thanks

"Andrew Taylor" wrote:

"list" is an Excel Name for the cell containing the list of characters.

You could use a cell reference instead, e.g.:

=MID(A1,1+INT(RAND()*LEN(A1)),1)

where A1 contains (say)
1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMN OPQRSTUVWXYZ


Tayo wrote:
Is the word 'list' in the formular the name of the header for the list? The
formular is not working. It's returning a #NAME? error. FYI, I am using
Excel 2003.


"Andrew Taylor" wrote:

Put all the possible characters in a cell, and name it as "list".
Then
=MID(list,1+INT(RAND()*LEN(list)),1)
will give a random character from the list. Use as many of these
as you need.

Andrew

Tayo wrote:
How can I generate random characters (both letters and numbers) into
different cells (both rows & columns) at he same time in excel?




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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Can I use a header or footer more than 255 characters in Excel? Jin Qingfeng Excel Discussion (Misc queries) 1 December 15th 05 12:07 PM
Can I use a header or footer more than 255 characters in Excel? Jin Qingfeng Excel Worksheet Functions 0 December 15th 05 02:22 AM
Random Selection of items in Excel? mnpremo Excel Discussion (Misc queries) 8 September 23rd 05 08:18 AM
Create random number bingo cards with Excel teachertolawyer New Users to Excel 5 September 15th 05 11:34 AM


All times are GMT +1. The time now is 01:53 AM.

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"