artrookie
10-16-2008, 02:35 AM
Hi
Could someone please help me with my query? Basically, I am storing a line of data into an array and would like to know if there is coding that returns the n'th item in this array without using a loop?
Attached below is a simplied version of the coding.
Assume Range("a1:e1").value has values {1,2,3,4,5}
Sub Macro1()
a = Range("a1:e1").Value
Range("a2").value = a
End Sub
Is it possible to modify this code to return item 5 into cell "a2" without a loop?
Range("a2").value = a(4) produces an error
Thanks in advance
Arthur
Could someone please help me with my query? Basically, I am storing a line of data into an array and would like to know if there is coding that returns the n'th item in this array without using a loop?
Attached below is a simplied version of the coding.
Assume Range("a1:e1").value has values {1,2,3,4,5}
Sub Macro1()
a = Range("a1:e1").Value
Range("a2").value = a
End Sub
Is it possible to modify this code to return item 5 into cell "a2" without a loop?
Range("a2").value = a(4) produces an error
Thanks in advance
Arthur