Quantcast
Channel: Active questions tagged worksheet-function - Super User
Viewing all articles
Browse latest Browse all 920

SUMIF only for last condition row

$
0
0

I have a spreadsheet where I need to total values using a SUMIF function and record that total in another column, but I only want it to record that total for the last instance of a value in the column.

For example, the 11,629 is only shown for the last instance of 103, etc.

ItemKeyAmountSubtotal
1001,213
103951
10310,656
121435
1006,214
1032211,629
1219,753
1003437,770
1212,805
12149713,490

I have a SUMIF function that works but populates all rows. I need to be able to record the formula in every row, but only have it display something for the last instance.

I guess I need something like an IF(<some way to determine last instance>=True, SUMIF(abcde), ""), I just don't know how to determine the last instance. What can I do to put this in place?

Maybe a COUNTIF to count instances from current row to the bottom?


Viewing all articles
Browse latest Browse all 920

Trending Articles