I am trying to take the sum of cells in one column (D) based on concurrent cells in another column (F). This is the formula I am currently using which works well, however I need more then 7 IF statements:
=IF(F2<>F3,D2,IF(F3<>F4,SUM(D2:D3),IF(F4<>F5,SUM(D2:D4),IF(F5<>F6,SUM(D2:D5),IF(F6<>F7,SUM(D2:D6),IF(F7<>F8,SUM(D2:D7),IF(F8<>F9,SUM(D2:D8),SUM(D2:D9))))))))
Does anyone know a better way to write this formula so it can take a larger range of cells in column F and/or improve the method?
Thanks
Bookmarks