Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello Excelers!
I have a program that subtracts time values on a worksheet and is SUPPOSED to write the diff to a worksheet row (same column). I define a range object for the data (the times to subtract) = data(row 2) - data(row 1) etc. I then write the diff values into an array (variant) I can see values in the array in the locals window My problem is when I attempt to write the new array with the diff values in to a range object (new column, and x rows) It always puts zeros in the range on the worksheet, but the correct number of rows and the correct column. Here is the code that takes the data, and puts it into the range (i wish): Set outputRange = Range(ColNum.Offset(0, 2), ColNum.Offset(0, 2)) rngRow = outputRange.Address rngCol = UBound(a) For k = LBound(a) To UBound(a) Debug.Print a(k) Next k outputRange.Value = a ' a is the array with the data in it (time values like 00:10:00 - 00:8:00) ' the output range is C3:C6 (this can change) I write the subtractions (values) into a (a variant) Debug prints the correct data. I redim the array to the count of rows (in this case 5) I always get zeros - what am i missing here? i choose not to do writes row by column because the dataset can be really big - any suggestions??? thanks eholz1 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Writing a range to an array... | 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 | |||
Range object to Array object conversion | Excel Programming | |||
Range object to Array object conversion | Excel Programming |