Using Sumif where criteria appears more than once

kev8279

New Member
Joined
Oct 12, 2009
Messages
29
Hi Guys,

I'm trying to use the sumif function to bring back data on to a list where the users appear more than once. What I want to do is only show the results once even if the user appears multiple times. I cannot use a pivot as I need to pivot all of the data once I get this sorted. Can anyone help
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Hello kev, welcome to MrExcel.

so if you have users in A2:A10 and you are using a SUMIF formula in B2:B10 try amending that to something like this

=IF(COUNTIF(A$2:A2,A2)>1,"Repeat","original_SUMIF)

replace original_SUMIF with your formula
 
Upvote 0
Thanks for the reply Barry, that works a treat!! Just out of interest how does this work as I would have thought the countif would also give the same result.

Just being nosy, thanks so much for the help
 
Upvote 0
As you copy the formula down the range for the COUNTIF changes, it always looks at the cells on that row and above only...so for the first occurence of any name COUNTIF will give you a 1 and the SUMIF is used.....but for all subsequent appearances of that name COUNTIF will count 2 or greater and give you "Repeat". Of course you can change the text to whatever you want, or return a blank by using ""
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,632
Latest member
jladair

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top