![]() |
#2
|
|||
|
|||
![]()
Try something like this
Code:
Sub Randomly_generate_a_number_between_1_and_10_inclusive() ' ' Macro1 Macro Range("b:b").Interior.Color = xlNone randnum = WorksheetFunction.RandBetween(1, 10) ' Range("D2") = randnum Range("A:A").Find(what:=randnum, LookIn:=xlValues, lookat:=xlWhole).Offset(0, 1).Interior.Color = vbYellow End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
derohanes | Excel | 3 | 01-25-2019 09:38 AM |
![]() |
Yde1203 | Excel Programming | 2 | 07-22-2018 08:24 AM |
RandBetween for PowerPoint | excelledsoftware | PowerPoint | 1 | 09-19-2014 11:32 PM |
![]() |
acbh | Excel | 1 | 09-12-2013 06:51 PM |
![]() |
EricT | Word VBA | 7 | 09-12-2012 04:13 PM |