What's the best way to sum many items based on certain conditions

cytochrome

New Member
Joined
Feb 8, 2017
Messages
18
Office Version
  1. 365
Platform
  1. Windows
Hi there,
Just wondering what's the best way to to sum the amount from table below:

AMOUNTACCOUNTCODE
1G111CA1
2G111CA2
7G111CA1
3G222CA3
2G555CA3
4G333CA4
5G333CA4
6G444CA4

to this:

ACCOUNTAMOUNTCODE
G111
8​
CA1
G111
2​
CA2
G222
3​
CA3
G555
2​
CA3
G333
9​
CA4
G444
6​
CA4

The raw data file had about 10,000 rows with many different account numbers. So wondering what would be the best way to accomplish this? It would be amazing if there is a VBA that can accomplish this but will equally appreciated for any suggestion with Excel built-in formulas/functions.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
MrExcelPlayground19.xlsx
ABCDEFG
1AMOUNTACCOUNTCODE
21G111CA1G111CA18
32G111CA2G111CA22
47G111CA1G222CA33
53G222CA3G555CA32
62G555CA3G333CA49
74G333CA4G444CA46
85G333CA4
96G444CA4
Sheet12
Cell Formulas
RangeFormula
E2:F7E2=UNIQUE(B2:C9)
G2:G7G2=SUMIFS(A2:A9,B2:B9,INDEX(E2#,,1),C2:C9,INDEX(E2#,,2))
Dynamic array formulas.
 
Upvote 0
Solution

Forum statistics

Threads
1,215,359
Messages
6,124,488
Members
449,165
Latest member
ChipDude83

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