How to sum values according to an accounting code

IanTr

New Member
Joined
Feb 18, 2018
Messages
3
Hi folks

I have an accounting spreadsheet which has, as one of its columns, a 3 character accounts code. Another column holds the value associated with this code. For example, column A holds the account code and column B the value:

ES2 $4.30

I'm looking for a formula, please, which can scan the whole sheet, find all values with a specific account code and place the total in another cell. I have about a dozen account codes, so I would create a list of those codes with the total of the values for each code placed next to it e.g.

ES2 $123.40
ES3 $75.60

So I need the formula which would go where $123.40 is located, and so on.

I have no idea where to start, so I would appreciate any help that anyone can give me.

Many thanks

Ian T
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Seems like a simple SUMIF as long as they are real numbers formatted as currency rather than text, so where C2 holds the accounts code to look up. In D2...

=SUMIF(A:A,C2,B:B)


Excel 2010
ABCD
2AC1372AC1818
3AC2144AC2382
4AC3145AC3145
5AC4370AC4370
6AC1166
7AC1280
8AC2238
Sheet2
Cell Formulas
RangeFormula
D2=SUMIF(A:A,C2,B:B)
D3=SUMIF(A:A,C3,B:B)
D4=SUMIF(A:A,C4,B:B)
D5=SUMIF(A:A,C5,B:B)
 
Last edited:
Upvote 0
Thanks, Mark. Just to clarify, each entry is on a separate row, the account codes are mixed up, so they could be like this:

AC1
AC2
AC1
AC3
AC4
AC3
AC1

etc. Would your method scan the whole worksheet looking for a specific code and then dump the sum of the associated values into a cell?
 
Upvote 0
Does the table I posted not already show that? See AC1 in the table I posted. It looks up in column A as per...

For example, column A holds the account code and column B the value:
 
Last edited:
Upvote 0
Hi Mark.. sorry, this really works. So thankful to you. You've no idea how much work this has saved me!
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

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