excelNewbie22
Well-known Member
- Joined
- Aug 4, 2021
- Messages
- 510
- Office Version
- 365
- Platform
- Windows
hi,
so i have randbetween generate random numbers,
and i need to copy the results as values only,
so i thought recording a simple macro
and modify it to an udf
like:
with a range of my choosing
so i can place the formula/udf which consistently copy the random numbers as values only
hope i explained right
can anyone help me out?
so i have randbetween generate random numbers,
and i need to copy the results as values only,
so i thought recording a simple macro
and modify it to an udf
like:
Excel Formula:
=CopyValOnly(a1:f1)
so i can place the formula/udf which consistently copy the random numbers as values only
hope i explained right
can anyone help me out?
VBA Code:
Sub copyval()
'
' copy macro1
'
'
Range("A1:D5").Select
Selection.Copy
Range("F1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub