Sum

brisbane bob

Board Regular
Joined
Aug 9, 2007
Messages
70
I have approximately 500 codes representing about 300 descriptions (i.e. some descriptions have more than one code) across 8 sites. The data is in four columns about 2,500 lines deep. How can I sum the data by Description by Site. I think it must revolve around array formulas but I'm new at all of this. I would be grateful for any help.

Any ideas?

Description, Site, Code, Value
Bank Charges, site A, 2, $85.00
Bank Charges, site A, 7, $98.00
Vehicle costs, site A, 10, $14.00
Rent, site A, 12, $15.00
Wages, site A, 15, $11.00
Wages, site A 16 $12.00
Bank Charges, site B 2 $57.00
Electricity, site B 4 $3.00
Rent, site B 5 $85.00
Stationery, site B 7 $14.00
Vehicle costs site B 10 $354.00
Wages site B 15 $81.00
Wages site B 16 $25.00
Electricity site C 3 $85.00
Salaries site C 6 $57.00
Bank Charges site C 7 $897.00
Vehicle costs site C 11 $14.00
Bank Charges site C 13 $81.00
Stationery site C 14 $25.00
Wages site C 15 $14.00
Stationery site C 26 $15.00
Stationery site C 29 $85.00
Bank Charges site D 1 $14.00
Bank Charges site D 2 $3.00
Vehicle costs site D 10 $98.00
Rent site D 12 $12.00
Wages site D 15 $354.00
Salaries site D 19 $897.00
Electricity site D 34 $85.00
Bank Charges site E 7 $50.00
Rent site E 12 $25.00
Wages site E 15 $57.00
Salaries site E 21 $81.00
Electricity site E 34 $100.00

$3,913.00


Bank charges Site A ?
Bank Charges Site C ?
 
Another otion: Pivot tables, with fields Hidden - Visible
Pivot table.xls
ABCDEFGHIJ
1DescriptionSiteCodeValue
2BankChargessiteA2$85.00SumadeValueSite
3BankChargessiteA7$98.00DescriptionsiteAsiteBsiteCTotalgeneral
4VehiclecostssiteA10$14.00BankCharges183579781218
5RentsiteA12$15.00Electricity38588
6WagessiteA15$11.00Rent1585100
7WagessiteA16$12.00Salaries5757
8BankChargessiteB2$57.00Stationery14125139
9ElectricitysiteB4$3.00Vehiclecosts1435414382
10RentsiteB5$85.00Wages2310614143
11StationerysiteB7$14.00Totalgeneral23561912732127
12VehiclecostssiteB10$354.00
13WagessiteB15$81.00
14WagessiteB16$25.00
15ElectricitysiteC3$85.00
16SalariessiteC6$57.00
17BankChargessiteC7$897.00
18VehiclecostssiteC11$14.00
19BankChargessiteC13$81.00
20StationerysiteC14$25.00
21WagessiteC15$14.00
22StationerysiteC26$15.00
23StationerysiteC29$85.00
Hoja1


GALILEOGALI
 
Upvote 0

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Is it possible to use INDIRECT with the array or coersion forumula? I'm probably just making a mistake although I'm normally OK with INDIRECT
 
Upvote 0
Hi

I used the forumula below which you wrote and it works great, retriving data from a workbook called TB feeder.xls from a sheet called Jul 06 Split. I'm trying to make the "Jul 06" part the INDIRECT part but Excel won't even accept the formula I'm trying. I've tried putting the INDIRECT in just about every position but no joy.

=SUMPRODUCT((('[TB feeder.xls]Jul 06 split'!$B$14:$B$637)=$E147)*(('[TB feeder.xls]Jul 06 split'!$D$14:$D$637)=$D147)*('[TB feeder.xls]Jul 06 split'!$K$14:$K$637))/1000


Rgds
 
Upvote 0
Hi

I used the forumula below which you wrote and it works great, retriving data from a workbook called TB feeder.xls from a sheet called Jul 06 Split. I'm trying to make the "Jul 06" part the INDIRECT part but Excel won't even accept the formula I'm trying. I've tried putting the INDIRECT in just about every position but no joy.

=SUMPRODUCT((('[TB feeder.xls]Jul 06 split'!$B$14:$B$637)=$E147)*(('[TB feeder.xls]Jul 06 split'!$D$14:$D$637)=$D147)*('[TB feeder.xls]Jul 06 split'!$K$14:$K$637))/1000


Rgds

Why did you replace the comma syntax, which is a bit faster...

A couple of things you need to take into account:

1) If you have to use INDIRECT, the target books must be open. This can be resolved using INDIRECT.EXT of the morefunc.xll add-in).

2) INDIRECT/INDIRECT.EXT will slow down your workbook.

That said...

Code:
=SUMPRODUCT(
   --(INDIRECT.EXT("'[TB feeder.xls]"&$A$2&" split'!B14:B637"))=$E147)
   --(INDIRECT.EXT("'[TB feeder.xls]"&$A$2&" split'!D14:D637"))=$D147)
   INDIRECT.EXT("'[TB feeder.xls]"&$A$2&" split'!K14:K637"))/1000
 
Upvote 0
Aladin

Thanks for your reply - your help is really appreciated.

I didn't realise that the target had to be open for INDIRECT to work (!) but the INDIRECT.EXT (which I'd never even heard of) works a treat.

Again, thanks
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,552
Members
449,088
Latest member
davidcom

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