Am able to capture a range using the below sub,but am not sure how i
can put these values into an array.
Sub test()
Set ExcelLastCell = ActiveSheet.Cells.SpecialCells(xlLastCell)
lastrowwithdata = ExcelLastCell.Row
Row = ExcelLastCell.Row
Do While Application.CountA(ActiveSheet.Rows(Row)) = 0 And Row <> 1
Row = Row - 1
Loop
last = Row
x = "a2"
x1 = "a" & last
x2 = x & ":" & x1
msgbox Range(x2)
End Sub
Now range x2 contains the starting cell as a2 and the last row
containing data in column A(say A5000).So i want to put the values of
A1:A5000 into an array.Any help on this woul be greatly appreciated.
Please reply as it is very urgent.