sumifs only first occurrence based on two criteria

aroramon

New Member
Joined
Feb 16, 2010
Messages
2
hi all,

I have data that's formatted as follows:

Col_A
Ontario
Col_B
Ontario1
Col_C
1
OntarioOntario11
OntarioOntario22
OntarioOntario22
OntarioOntario22
AlbertaAlberta13
AlbertaAlberta13
AlbertaAlberta13
AlbertaAlberta24
AlbertaAlberta35
AlbertaAlberta35
ManitobaManitoba16
ManitobaManitoba27
ManitobaManitoba27
ManitobaManitoba27
ManitobaManitoba38
ManitobaManitoba38

<colgroup><col><col><col></colgroup><tbody>
</tbody>

on another sheet, I am looking to add a sumifs type formula based on column A which sums the data in column C, but only for the first instance of whatever value is in column b. i.e. sum for Ontario should be 1+2 = 3. Sum for Alberta should be 12. Sum for Manitoba should be 21. Thank you in advance for any help!
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
This formula will sum the data for you on the same sheet - =SUMIFS($C$2:$C$18,$A$2:$A$18,A2,$B$2:$B$18,B2).
 
Upvote 0
.. sums the data in column C, but only for the first instance of whatever value is in column b. i.e. sum for Ontario should be 1+2 = 3. Sum for Alberta should be 12. Sum for Manitoba should be 21.
Try this, copied down. It is an array formula so should be entered without the {} but confirmed with Ctrl+Shift+Enter, not just Enter. If confirmed correctly, Excel will insert the {}. The formula can then be copied down.

Excel Workbook
ABCDEFG
1Col_ACol_BCol_C
2OntarioOntario11Ontario3
3OntarioOntario11Alberta12
4OntarioOntario22Manitoba21
5OntarioOntario22
6OntarioOntario22
7AlbertaAlberta13
8AlbertaAlberta13
9AlbertaAlberta13
10AlbertaAlberta24
11AlbertaAlberta35
12AlbertaAlberta35
13ManitobaManitoba16
14ManitobaManitoba27
15ManitobaManitoba27
16ManitobaManitoba27
17ManitobaManitoba38
18ManitobaManitoba38
19
SUM
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,821
Messages
6,121,759
Members
449,048
Latest member
excelknuckles

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