sum column D based on column A

A

anthony

I have a worksheet having claim numbers in column A invoice numbers in column
B and invoice amoiunts in column D. A single claim may have one or more
invoices

How can I have claim totals/sum/amount in column M?(Prefarably in the same
row as the last invoice for each claim)
 
R

Roger Govier

Hi Anthony

Try
=IF(COUNTIF($A$1:$A1,A1)=COUNTIF($A$1:$A$12,A1),SUMIF($A$1:$A$12,A1,$D$1:$D$12),"")

Amend ranges to suit
 
Top