Code is below:
Trying to read the value of a cell to put only unique values into an array for later uses.
Sub Unique()
Dim ARComputer() As String, ARAssign() As Variant, I, intRow, intLastRow, x
I = 0: r = 0
intLastRow = Range("A65536").End(xlUp).Row
ARComputer(I) = Cells(intLastRow, 1).Value ' Error occurs at this line Trying to assign first value and then use this later to compare to other values
For intRow = intLastRow To 2 Step -1
Rows(intRow).Select
If ARComputer(I) <> Cells(intRow, 1).Value Then
I = I + 1
ReDim Preserve ARComputer(I)
ARComputer(I) = Cells(intRow, 1).Value
End If
Next intRow
End Sub
Bookmarks