Hi, I am trying to write a formula that will SUM between one and twenty columns in a row, based on the number in another cell in the same row.
If the number is 20, I want to sum all 20 cells in the row. If the number is 19, I want to sum the first 19 cells.
The range is always contiguous, and the cells to be summed always start with first cell in the range. The higher the number, the more cells to the right I want to sum.
So - Sum range A if criteria cell is X, Sum range B if criteria cell is Y, etc...I just can't figure out the right pair of functions to use and the syntax to put them together.
Thanks!
DJ