Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
No question here just a procedure for the archive.
Return a random letter for each cell in selection Sub RandomLetterGenerator() 'Returns a random letter in each cell in selection On Error Resume Next Selection.FormulaR1C1 = "=CHAR(TRUNC(RAND()*26+65))" 'Paste value the formulas Selection.Copy Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False Application.CutCopyMode = False End Sub search criteria return random letters insert random letters generate random letters |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Just so that this doesn't appear unanswered, one comment: no need for the pastespecial:
Sub RandomLetterGenerator2() 'Returns a random letter in each cell in selection Selection.FormulaR1C1 = "=CHAR(TRUNC(RAND()*26+65))" Selection.Value = Selection.Value End Sub HTH, Bernie MS Excel MVP wrote in message oups.com... No question here just a procedure for the archive. Return a random letter for each cell in selection Sub RandomLetterGenerator() 'Returns a random letter in each cell in selection On Error Resume Next Selection.FormulaR1C1 = "=CHAR(TRUNC(RAND()*26+65))" 'Paste value the formulas Selection.Copy Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False Application.CutCopyMode = False End Sub search criteria return random letters insert random letters generate random letters |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Return two random lines | Excel Worksheet Functions | |||
How to? Create random letters and numbers in a cell | Excel Worksheet Functions | |||
How to return a number into letters? | Excel Worksheet Functions | |||
random combination of letters | Excel Worksheet Functions | |||
trying to find random drive letters | Excel Programming |