Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim data As Variant
data = Range("A1:E1").Value assigns to the variant variable "data" the array of values from A1:E1. data(1,2) would then return the value that's in B1. sbcglobal seems not to have tested the advice given. Alan Beban sbcglobal wrote: look, you dim 'data' as variant, then you try to give it value..i believe you'd try: redim data(1 to 5) before you assign value..otherwise vba will show 'out of range' erro. another error is, unless you dim data as range, i believe you need to loop thorugh each data(i) to assign value. for example: redim data(1 to 5) for i = 1 to ubound(data) xxxx next or dim data as range set data = your range rgds, "TAM" wrote in message . uk... Can you please tell me if it is possible to return a value of say the second cell (B1) from the following statement... Dim data As Variant data = Range("A1:E1").Value I have tried numerous ways but can not get the value of each cell in the range which I need to examine before actioning Thanks TAM |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Array Problem | Excel Discussion (Misc queries) | |||
Array problem | Excel Programming | |||
Array Problem?? | Excel Programming | |||
Array Problem | Excel Programming | |||
Array Problem, Help Please. | Excel Programming |