# Make this against LAST item? =IF(COUNTIF(A\$1:A1,A1)=1,SUMIF(A:A,A1,B:B),"")

from another Q_28146015
Do I need a sum on each row even if A1 is repeated? No.
I could invoke SUMIF just on the first row for each repeated value,

i.e. like

=IF(COUNTIF(A\$1:A1,A1)=1,SUMIF(A:A,A1,B:B),"")

Question:
What I would like is the sumif value against the LAST instance of the matching criterion.
Blank criterion  to refer to a different column, same row.
LVL 9
###### Who is Participating?

Commented:
If you are using a finite number of rows (say 1000 but you can adjust that) then try

=IF(COUNTIF(A1:A\$1000,A1)=1,SUMIF(A\$1:A1,A1,B\$1:B1),"")

or for an indefinite number of rows

=IF(COUNTIF(A\$1:A1,A1)=COUNTIF(A:A,A1),SUMIF(A\$1:A1,A1,B\$1:B1),"")

regards, barry
0

Chartered AccountantAuthor Commented:
this is the one I wanted, points for this: =IF(COUNTIF(A\$1:A1,A1)=COUNTIF(A:A,A1),SUMIF(A\$1:A1,A1,B\$1:B1),"")

thanks

are you sure about that first one working with last item?

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.