Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
I have a formula that I cannot get right and have been working on it
for several days now and would appreciate a "parenthesis" in the right place. The background : I have to calculate the total of a column based on the year of purchase of an item (depreciated over 5 years) BUT, the first 2 items only get included in the total if the column year is the year of purchase, i.e. the first year. Cells: o12:w12 contain the years to be totalled for K15/16 are the years for the first 2 items K19:K41 are the years for the remaining items BB15:BB41 are the values to be totalled all Year cells are custom yyyy format all cells to be totalled are numeric I created a grid of valid combinations as follows K15 K16 Cells totalled Blank Blank BB19:BB41 * Blank =o12 BB16:BB41 ** Blank <o12 BB19:BB41 * =o12 =o12 BB15:BB41 *** <o12 <o12 BB19:BB41 * =o12 <o12 BB19:BB41 + BB15 **** <o12 =o12 BB16:BB41 ** =o12 Blank BB19:BB41 + BB15 **** <o12 Blank BB19:BB41 * So there appear to be only 4 sets of calculations I need to make. I created the following formula but keep getting missing parenthesis errors. =IF(OR(AND(K15="",K16=""),AND(K15="",YEAR(K16)<YE AR(O12)),AND(YEAR(K15)<YEAR(O12),YEAR(K16)<YEAR( o12)),AND(K16="",YEAR(K15)<YEAR(o12))),SUM(BB19:B B41),IF(or(AND(K15="",year(K16)=year(o12)),AND(yea r(K15)<year(o12),year(k16)=year(012)),SUM(BB16:BB 41)),if(and(year(k15)=year(o12),year(k16)=year(o12 )),sum(bb15:bb41)),if(OR(AND(year(k15)=year(o12),y ear(k16)<year(o12)),and(k16="",year(k15)=year(o12 )),sum(bb19:bb41+bb15)) Any help or suggestions anyone can give would be much appreciated. TIA Fred |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel VBA Gurus needed | Excel Discussion (Misc queries) | |||
solver related some financial knowledge may be needed | Excel Discussion (Misc queries) | |||
formula results take up to 2 lines if needed, but keep border | Excel Worksheet Functions | |||
Custom percent format needed | Excel Worksheet Functions | |||
Forulma Needed | Excel Worksheet Functions |