SUM on unique/distinct fields only

badinvestor

New Member
Joined
Dec 28, 2009
Messages
21
I've found several post that SHOULD have answered this question but I can't quite get them to work for me. Probably because they are all array formulas and I'm just not that good with those. So here is my exact situation. In column A I have 'AccountNumbers' and in column O I have 'Balances' in between I have all the transactions that make the balance shown in column O so that A has multiple lines with the same account number and O has multiple lines with the same balance's for the account. What I would like to do is SUM column O to get the balance of all accounts. So I need to sum only unique account numbers. Ex.
I would like to show the balance as being 30. Any help is much appreciated.

AccountNumberBalances
123410
123410
456720
456720

<tbody>
</tbody>
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
I think I may have answered my own question: =SUM(IF(FREQUENCY(IF(SUBTOTAL(3,OFFSET(A2:A14495,ROW(A2:A14495)-ROW(A2),0,1)),MATCH(A2:A14495,A2:A14495,0)),ROW(A2:A14495)-ROW(O2)+1)>0,O2:O14495))
This appears to work....
 
Upvote 0

Forum statistics

Threads
1,215,044
Messages
6,122,827
Members
449,096
Latest member
Erald

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