I have created the following array:
I get the error myarray is empty
What I'm trying to do is look at all the data in column G
Some cells in this range are blank
if data exists assign each value to the array H2
H2(1) would be first value
H2(2) would be second value so on and so on
Any help would be greatly appreciated
Code:
Dim LR As Long
Dim Fib1 As Double
Dim myarray As Variant
Dim H2 as Double
LR = ActiveSheet.UsedRange.Rows.Count
myarray = Range("G2:G & LR").Value
if H2 >0 than
'Looping structure to look at array.
For Fib1 = 1 To UBound(myarray)
MsgBox myarray(Fib1, 1)
Next
Next
I get the error myarray is empty
What I'm trying to do is look at all the data in column G
Some cells in this range are blank
if data exists assign each value to the array H2
H2(1) would be first value
H2(2) would be second value so on and so on
Any help would be greatly appreciated