Sub Driver()
'Highlights driver who have 1 point
Dim driverData ' array variable to hold driver names
driverData = Range("C2:C391").Value
ReDim driverData(390)
MsgBox driverData(3)
Though Range(“C2:C391”) has values in the worksheet, the array seems to be having only blanks
So, using the MsgBox command, only a blank appears
When you use just
ReDimyou clober all the contents in the array. You need to useReDim Preserveto keep elements that are in the array.That being said, the you can’t simply redim a 2D array into a 1D array. You can do this: