Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
Solved

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

Posted on 2013-06-03
Medium Priority
1,082 Views
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.
0
Question by:Anthony Mellor
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 50

Accepted Solution

barry houdini earned 2000 total points
ID: 39217101
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

LVL 9

Author Comment

ID: 39218482
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

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
###### Suggested Courses
Course of the Month11 days, left to enroll