Formula inquiry

System
System Employee
edited 03/14/25 in Formulas and Functions
This discussion was created from comments split from: Formula for Referencing Cell Above Current Cell?.

Best Answer

Answers

  • Zach_
    Zach_ ✭✭
    edited 03/13/25

    Hi @Paul Newcome! I have a very similar question but a different use case.

    I am tracking the cumulative amount of training hours (from FY to FY) that my team has saved through the availability of self-serve resources. It's easy to calculate the number of hours for any given FY, but I am having trouble getting them to accumulate (i.e., add to the previous year's total).

    I wonder if you're able to identify what I'm doing wrong, or what I can change to make this work.

    I nested the formula INDEX function into my formula. It works for one year (see FY24), but then when I try to apply it to a second year (FY25), I get a circular reference error.

    INDEX([Hours Saved (Accumulating)]:[Hours Saved (Accumulating)], Row@row - 1)

    The Row@row reference works together with an Auto Number column to give each row a unique identity.

    Thank you very much

  • Zach_
    Zach_ ✭✭

    @Paul Newcome, I think I figured this out.

    I made a helper column with the following formula, and it's working. It sums the hours for the entire column, then subtracts the hours of any rows that have a Row ID greater than the row in question.

    =SUM([Hours Saved (Accumulating)]:[Hours Saved (Accumulating)]) - SUMIFS([Hours Saved (Accumulating)]:[Hours Saved (Accumulating)], [Auto Number]:[Auto Number], @cell > [Auto Number]@row)

  • Paul Newcome
    Paul Newcome Community Champion
    Answer ✓

    @Zach_ Glad you got it sorted. You could also use similar logic and add all rows that are less than or equal to the current row number.

    =SUMIFS([Hours Saved (Accumulating)]:[Hours Saved (Accumulating)], [Auto Number]:[Auto Number], @cell <= [Auto Number]@row)

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!