Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello
How can I use VBA to write a range to an array, change the elements of the array, and then write back to a worksheet? I started with this but got an error for the line Data(i)... Sub ArrayTest() Dim Data As Variant, i As Integer Data = Range("A1:A10").Value For i = LBound(Data) To UBound(Data) Data(i) = Data(i) + 10 Next i End Sub Here I want to take range A1:A10, add 10 to all of the values, and the write it back to the worksheet. I want to do this as I think it is faster then maipulating individual cells in a range, especially when the range is large. Any help very welcome. Regards Alex |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Writing to An Array or Collection | Excel Programming | |||
Q: Best way to take data from VBA into graphs without writing data to worksheets? (Can a named range refer to an array in memory only?) | Excel Programming | |||
Writing Range to Array | Excel Programming | |||
Prb: Writing Array functions in VBA | Excel Programming | |||
Writing Array Formulas in VBA | Excel Programming |