R
RobcPettit
I have data in a column which I have named dates. What Im doing is using an
array to get those values, then looking for a certain value, stored in 'Dat',
and getting how far down the array that value is. IM using this:
Dim Collectdat() as Variant
Collectdat = Range("Dates").Value
For A = 1 To UBound(Collectdat)
If Dat = Collectdat(A , 1) Then
Row = (A)
Exit For
End If
Next A
What I think Im doing is working with a single dimension array, as Im entering
only one column into the array, therefore I should use '= Collectdat(A), but
this does not work so Ive used the above. Could someone advise were Im going
wrong, Im now thinking that if it was a Row instead of a column this would be
correct.
Also is there a way of seeing how far down my value is without using for/next.
What I meen if the value is the 20 etc, in the array.
Regards Robert
array to get those values, then looking for a certain value, stored in 'Dat',
and getting how far down the array that value is. IM using this:
Dim Collectdat() as Variant
Collectdat = Range("Dates").Value
For A = 1 To UBound(Collectdat)
If Dat = Collectdat(A , 1) Then
Row = (A)
Exit For
End If
Next A
What I think Im doing is working with a single dimension array, as Im entering
only one column into the array, therefore I should use '= Collectdat(A), but
this does not work so Ive used the above. Could someone advise were Im going
wrong, Im now thinking that if it was a Row instead of a column this would be
correct.
Also is there a way of seeing how far down my value is without using for/next.
What I meen if the value is the 20 etc, in the array.
Regards Robert