Random Number to Second Column

D

Dan Tschippert

I am using the following to generate a random number and the date and time
of it's creation. What can I add to continue to a second column after the 18
rows are used. So a number would be in column b rows 2 to 18 then after b18
is used, continue to column e rows 2 to 18 agian.

Sub DanRandom()
Dim myCell As Range
Set myCell = Range("b18").End(xlUp)(2)

myCell.Value = "'" & Format(1000 * Rnd(), "000")
With myCell(1, 2)
.Value = Now()
.NumberFormat = "hh:mm:ss mmm dd, yyyy"
End With

End Sub

Thanks in advance for any help suggested.

Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top