Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Structure of worksheet is:
A |B| C |D| E |F| G |H| I |J| K |L| M | Year | | Year | |Change | |Budget| | |Budget | | Actual | |Budget | | Actual | |Y to Y+1| | Y+1 | | Comments for a number of years with the | representing cell boundaries; the builder did really put a blank column between each of those holding data. :( Every year, the four columns equivalent to E-H above for the last year are duplicated and inserted between H:I in preparation for the next years exercise and the new years inserted. Now to the question -- in the comments section are some formulae such as ="Average last 5 years = " & TEXT(AVERAGE(M7,Q7,U7,Y7,AD7),"$#,##0") & ". Min = " & TEXT(MIN(M7,Q7,U7,Y7,AD7),"$#,##0") & ", Max = " & TEXT(MAX(M7,Q7,U7,Y7,AD7),"$#,##0") which let one see the range of income/expenses over the previous five years as well as average. Not every account has the identical comment; some also have a current balance for that account that is a reference to another workbook. The above requires very tedious editing of the formulae to account for the new year since every column is referenced explicitly; they don't advance to the next set of five years; they're static. Last year I fixed to at least use something like ="Actual 5-yr Average = " & TEXT(AVERAGE(OFFSET(AT13,0,-8),OFFSET(AT13,0,-12),OFFSET(AT13,0,-15),OFFSET(AT13,0,-19),OFFSET(AT13,0,-23)),"$#,##0") & ".Minimum = " & TEXT(MIN(OFFSET(AT13,0,-8),OFFSET(AT13,0,-12),OFFSET(AT13,0,-15),OFFSET(AT13,0,-19),OFFSET(AT13,0,-23)),"$#,##0") which is even more cryptic but at least does account for the reposition of the local column excepting it is still referenced to the specific cell. Is there a way to write something similar to the above that computes the desired locations given an input number of years over which to look (the above would be 5, there are a couple that now exist that are 8 instead)? Seems like there should be some way to write a reference to a set of N cells spaced every other column or every M cells apart without having to build a list of N addresses, but I've not come up w/ a simple way to do so... In MATLAB, I could just write Actual(i1:M:(i1+M*N)) to return the array elements of interest. -- |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Variable reference to add cells | Excel Discussion (Misc queries) | |||
COUNTIF on NonContiguous Cells? | Excel Worksheet Functions | |||
average of 12 noncontiguous cells | Excel Discussion (Misc queries) | |||
Adding noncontiguous cells | Excel Discussion (Misc queries) | |||
noncontiguous cells | Excel Discussion (Misc queries) |