View Single Post
 
Old 02-21-2021, 01:51 AM
Purfleet Purfleet is offline Windows 10 Office 2019
Expert
 
Join Date: Jun 2020
Location: Essex
Posts: 345
Purfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to behold
Default

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
Attached Files
File Type: xlsm Copy of RECAP Project_Purfleet.xlsm (23.2 KB, 4 views)
Reply With Quote