Sum Lookup

Bigbz

New Member
Joined
Nov 9, 2014
Messages
11
Hi All,


Im trying to automate a dash board for financial reporting across branches. This is what mu dashboard looks like:
DateNov 16
Shop 1Shop 2
Sales5400045000
Purchases1250024000

<tbody>
</tbody>

I then have a tab for each branch which looks like this:

Shop 1June 16Jul 16Aug 16
Sales125001000020000
Purchases500020004500
Wages150020003000

<tbody>
</tbody>

Shop 1 would be the name of the tab.

What formula should i use on the dashboard that looks up the branch tab, then looks up the line name eg sales, then sums the monthly data for the year up until l the date on the dashboard?


Thanks in advance.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
=SUM('Shop 1'!B2:XXX2)

Edit: Just saw the date part, sorry.
How about
=SUMPRODUCT(('Shop 1'!B2:XXX2),--('Shop 1'!A2:XXX2<=B1))

I'm not at my computer so I can't double check it but I think it should work. B1 is the date cell
 
Last edited:
Upvote 0
Hi,

Thanks for your reply. I need to to be a bit more dynamic as the information on the branch tabs is a copy and paste from accounting software each month. The sales or purchase lines can change each month, depending on the transactions for the month. Is it also possible to have a dynamic reference to the tab name so I can copy the formula across on the dashboard?

Cheers
 
Upvote 0
Some pictures might make this clearer. The "Dashboard" is where I am trying to enter the formula to lookup and sum from each branch. I need to lookup the "Branch 1" tab, look uo the expense line, then sum across the values to the date on the dashboard (C3). I am trying to enter a formula into cell C10 to do this. I have tried, sumif, vlookups ect with no success.

Thanks fort your help


ABCDE
1
2Finance Dashboard
3Actuals toSep-16
4
5Branch 1Branch 2Branch 3
6
7
8
9Expense
10Animal Health total
11Breeding total
12Calf Rearing total
13Other Animal total
14Cleaning
15Other Feed total
16Fertiliser total
17Weed & Pest total
18Pasture Renewal total
19Repairs and Maintenance total
20Electricity total
21Shed Expenses total
22Staff Costs total
23Vehicle Expenses total
24Other Operations total
25Non Operating total

<tbody>
</tbody>
Dashboard





This is a sample of each branch profit & loss report. Its important to note that the expense items are dynamic in each branch, and change every month. The tab name for each branch P & L is "Branch 1" and "Branch 2"

ABCDEFGHIJKLMN
8Jun-16Jul-16Aug-16Sep-16Oct-16Nov-16Dec-16Jan-17Feb-17Mar-17Apr-17May-17Total
46Animal Health total1795,09212,31615,55214,4746,4702,1021,384----57,569
47Breeding
48Breeding Expenses----6,9307,181------14,111
49Breeding total----6,9307,181------14,111
50Calf Rearing
51Calf Rearing Expenses1,3794,890948---------7,217
52Calf Rearing total1,3794,890948---------7,217
53Other Animal
54Animal Identification5474,7683117091,3618982,339619----11,552
55Other Animal total5474,7683117091,3618982,339619----11,552
56Grazing
57Grazing Expenses--4,3432,3643,6123,5103,6124,225----21,666
58Grazing total--4,3432,3643,6123,5103,6124,225----21,666
59Other Feed
60Maize & Grass Silage--17,767----6,432-----11,335
61Other - Feed10,0801,42019,501---------31,001
62PKE-4,04726,16712,68644,96228,6287,2428,5824,556---136,870
63Other Feed total10,0805,46763,43512,68644,96228,6288108,5824,556---179,206
64Fertiliser
65Fertiliser---15,72110,1271,06845,098-----72,014
66Fertiliser total---15,72110,1271,06845,098-----72,014
67Weed & Pest
68Weeds & Pests--2,6772,429-7,8047,847-----20,757
69Weed & Pest total--2,6772,429-7,8047,847-----20,757
70Pasture Renewal
71Repairs and Maintenance

<tbody>
</tbody>
Branch 1




 
Upvote 0
From the sounds of it, you are not actually summing anything, you just want to bring back data based specific criteria. See if this will work for you...
A​
B​
C​
D​
1​
Finance Dashboard
2​
Actuals to
9/1/2016​
3​
4​
Branch 1​
Branch 2​
Branch 3​
5​
Expense
6​
Animal Health total
15552​
7​
Breeding total
-​
8​
Calf Rearing total
-​
9​
Other Animal total
709​
10​
Cleaning
11​
Other Feed total
12686​
12​
Fertiliser total
15721​
13​
Weed & Pest total
2429​
14​
Pasture Renewal total
15​
Repairs and Maintenance total
16​
Electricity total
17​
Shed Expenses total
18​
Staff Costs total
19​
Vehicle Expenses total
20​
Other Operations total
21​
Non Operating total
B6=IFERROR(INDEX('Branch 1'!$B$2:$M$27,MATCH($A6,'Branch 1'!$A$2:$A$27,0),MATCH($C$2,'Branch 1'!$B$1:$M$1,0)),"")
copied down

All you then need to do is change the BOLDED reference for each sheet. I could put something together that would use B4:D4 to pull from the specific sheet, using INDIRECT(), but you probably don't need to get that fancy
 
Upvote 0
Thanks Ford,

That's quite helpful. However, I am wanting to sum the amounts on the Branch 1 tab, up to and including the selected month (sum June, July, August & September amounts).

How do I change the formula to do this?
 
Upvote 0
OK try this...
A​
B​
C​
1​
Finance Dashboard
2​
Actuals to
9/1/2016​
3​
4​
Branch 1​
5​
Expense
6​
Animal Health total
33139​
7​
Breeding total
0​
8​
Calf Rearing total
7217​
9​
Other Animal total
6335​
10​
Cleaning
0​
11​
Other Feed total
91668​
12​
Fertiliser total
15721​
13​
Weed & Pest total
5106​
14​
Pasture Renewal total
0​
15​
Repairs and Maintenance total
0​
16​
Electricity total
0​
17​
Shed Expenses total
0​
18​
Staff Costs total
0​
19​
Vehicle Expenses total
0​
20​
Other Operations total
0​
21​
Non Operating total
0​
B6=SUMPRODUCT(--('Branch 1'!$B$1:$M$1<=$C$2)*('Branch 1'!$A$2:$A$27=$A9),('Branch 1'!$B$2:$M$27))
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,718
Members
448,986
Latest member
andreguerra

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