Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Well, I suppose it's fair to say that some might think
For i = startRow to endRow:For j = startColumn to endColumn RangeOfCells(i, j) = myArray(i, j) Next:Next is simpler and more direct. For someone like me, who always has the downloaded functions available, perhaps not. Alan Beban Bob wrote: Alan, As always, thanks! I will definitely take a closer look at your SubArray function. In hindsight, if there was a simpler or more direct way to address a range within an array, you wouldn't have needed to write a UDF. Silly me. Thanks again, Bob "Alan Beban" wrote: For a "range of cells", as you call it, in e.g., myArray For i = startRow to endRow:For j = startColumn to endColumn RangeOfCells(i, j) = myArray(i, j) Next:Next Using the downloaded functions it's implicit in the response below (i.e., SubArray(HoursArray,1,14,1,1)). Review the description of the downloaded SubArray function. SubArray(myArray, startColumn, endColumn, startRow, endRow) to return a 1-based "range of cells" (i.e., subarray). The built-in COUNTIF function doesn't operate on VBA arrays, hence the use of the downloaded ArrayCountIf function below. Alan Beban |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to fix an array or range | Excel Discussion (Misc queries) | |||
Range to Array | Excel Programming | |||
copy one array formula to an array range | Excel Programming | |||
Tricky array formula issue - Using array formula on one cell, then autofilling down a range | Excel Programming | |||
Range as array | Excel Programming |