I solved it. I made the code highly flexible for varying column sizes. enjoy!
Sub FillEmptyFromSelection()
Dim LR as Long
Dim CR As Long
LR = Range("DATA!C" & Rows.Count).End(xlUp).Row
CR = Range(Range("RANDOM!C2"), Range("RANDOM!C65535").End(xlUp)).Count
'***LR is the range of the target data set with the blanks, CR the count of the rows from the column with all till the data, from which a cell will be randomly selected and inserted.
Dim i As Integer
For i = 1 To LR
If Range("DATA!C" & i).Value = "" Then Range("DATA!C" & i).Value = Worksheets("RANDOM").Cells((CR) * Rnd + 1, 3)
Next i
'*** In layman's terms, if there is an empty cell in column C in the DATA sheet, it will be '*** replaced by a random cell in column B in the RANDOM sheet.
End Sub
Bookmarks