SUMIF Formula

acool

Board Regular
Joined
Feb 10, 2023
Messages
121
Office Version
  1. 365
Platform
  1. Windows
Hi Everyone,

I am trying to create a sumif formula which provides the sum for only the first occurrence of my "criteria" based on my data set on the right. While the criteria "Andrew, England" my have a sum of 7 based on the data set on the right, I would only like for that sum to display for only the first occurrence on the right. Any help or insight would be greatly appreciated! Thank You!

1678197572780.png
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
How about
Excel Formula:
=IF(AND(A2=A1,B2=B1),"",SUMIFS(G:G,E:E,A2,F:F,B2))
 
Upvote 0
Solution
In case your values in columns A and B are not all consecutive (sorted), you could use this variation (in cell C1 and copy down):
Excel Formula:
=IF(COUNTIFS(A$1:A1,A1,B$1:B1,B1)=1,SUMIFS(G:G,E:E,A1,F:F,B1),"")
 
Upvote 0

Forum statistics

Threads
1,223,099
Messages
6,170,108
Members
452,302
Latest member
TaMere

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