Hi All

Referring the table below, I wish to sum total invoice value on the line where invoice is ending. Each invoice number has line numbers and sum formula should be applicable only on last line/max line of each invoice. Kindly suggest.

Inv Number Line No Value Sum by Invoice
316 1 $500
316 2 $215
317 1 $452
317 2 $125
317 3 $521
317 4 $124
318 1 $150

Thanks
Sats