EXCEL FORMULA

P

Pat

I have a table with a cell for budget code and a cell for total cost. I want
a total at the end of the table for each budget code so that I can cost it
out properly without manually adding each entry for each code. For example:
BUDGET CODE 5160 TOTAL CHARGES $2.00
BUDGET CODE 5131 TOTAL CHARGES $3.50
BUDGET CODE 5160 TOTAL CHARGES $3.50

Then at the end of the table I want to total each budget code:
BUDGET CODE 5160 TOTAL $3.50

ETC.

Currently I use the calculator and manually add 30 or 40 entries scattered
throughout the table, sometimes missing an entry etc. and want to set up the
spreadsheet to do this.
 
E

Elkar

Ok, let's assume that your buget codes are in column B and your charges are
in column D.

=sumif(b:b,"=5160",d:d)

Repeat for each Budget Code

Or, if you have other data on your worksheet in those columns that you don't
want added in, you can specify a specific range (like rows 2 thru 50):

=sumif(b2:b50,"=5160",d2:d50)

HTH,
Elkar
 
D

Duke Carey

Assuming the Budget Codes are in col B and the $$ are in col D, use

=SUMPRODUCT(--(B1:B500=5160),D1:D500)
 
P

Pat

Sorry to confuse I meant the end of the table total should be $5.50 as it is
adding all entries for 5160 code.
 
Top