SUM and OFFSET Summary tables

drluke

Active Member
Joined
Apr 17, 2014
Messages
314
Office Version
  1. 365
Platform
  1. Windows
[TABLE="width: 531"]
<colgroup><col width="32" style="width: 24pt; mso-width-source: userset; mso-width-alt: 1170;"> <col width="64" style="width: 48pt;"> <col width="228" style="width: 171pt; mso-width-source: userset; mso-width-alt: 8338;"> <col width="64" style="width: 48pt;" span="6"> <tbody>[TR]
[TD="width: 32, bgcolor: transparent"][/TD]
[TD="width: 292, bgcolor: transparent, colspan: 2"]SUMMARY[/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] "] [/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] "]A[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] "]B[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] "]C[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] "]D[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] "]E[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] "]F[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] "]G[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] , align: right"]1[/TD]
[TD="bgcolor: transparent"]8-YTD[/TD]
[TD="bgcolor: transparent"]January-August 2018[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] , align: right"]2[/TD]
[TD="bgcolor: transparent"]Number[/TD]
[TD="bgcolor: transparent"]Name[/TD]
[TD="bgcolor: transparent"]Bal b/f[/TD]
[TD="bgcolor: transparent"]Sales[/TD]
[TD="bgcolor: transparent"]Returns[/TD]
[TD="bgcolor: transparent"]Adj[/TD]
[TD="bgcolor: transparent"]Total[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] , align: right"]3[/TD]
[TD="bgcolor: transparent"]101[/TD]
[TD="bgcolor: transparent"]Coventry[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] , align: right"]4[/TD]
[TD="bgcolor: transparent"]102[/TD]
[TD="bgcolor: transparent"]Liverpool[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] , align: right"]5[/TD]
[TD="bgcolor: transparent"]103[/TD]
[TD="bgcolor: transparent"]Cardiff[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="width: 676, bgcolor: transparent, colspan: 8"]In a second sheet - DATA2018 - I have 3 tables with data for Jan - Dec for each of Sales, Returns & Adj. I also have a table for opening balances.[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="width: 676, bgcolor: transparent, colspan: 8"]A1 is a dropdown from a list. For every month there are 2 selections available in the list: (a) data for the period only; (b) data for the YTD[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="width: 676, bgcolor: transparent, colspan: 8"]I want to summarise data in my data tables based on the selection made from the dropdown in A1. [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="width: 676, bgcolor: transparent, colspan: 8"]Bal b/f if A1=1: simple lookup to the op balance table[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="width: 676, bgcolor: transparent, colspan: 8"]Bal b/f if A1=anything else: opening balance + sum of Sales, Returns & Adj for all prev months for all numbers in A3 down[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="width: 676, bgcolor: transparent, colspan: 8"]I won't ever have to calculate opening balances for Sales returns or Adj[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="width: 676, bgcolor: transparent, colspan: 8"]For the other 3 types of transactions if eg A1=6, then just show the totals for June from the data sheet, but if A1=6-YTD then I need to show the total of Jan-Jun for each[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="width: 676, bgcolor: transparent, colspan: 8"]In my data sheet the data is arranged in tables like this:[/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] "] [/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] "]A[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] "]B[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] "]C[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] , align: right"]1[/TD]
[TD="bgcolor: transparent"]Number[/TD]
[TD="bgcolor: transparent"]Name[/TD]
[TD="bgcolor: transparent"]Bal b/f[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] , align: right"]2[/TD]
[TD="bgcolor: transparent"]101[/TD]
[TD="bgcolor: transparent"]Coventry[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] , align: right"]3[/TD]
[TD="bgcolor: transparent"]102[/TD]
[TD="bgcolor: transparent"]Liverpool[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] , align: right"]4[/TD]
[TD="bgcolor: transparent"]103[/TD]
[TD="bgcolor: transparent"]Cardiff[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]SALES[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] "] [/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] "]A[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] "]B[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] "]C[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] "]D[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] "]E[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] "]F[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] "]G[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] , align: right"]105[/TD]
[TD="bgcolor: transparent"]Number[/TD]
[TD="bgcolor: transparent"]Name[/TD]
[TD="bgcolor: transparent, align: right"]Jan-18[/TD]
[TD="bgcolor: transparent, align: right"]Feb-18[/TD]
[TD="bgcolor: transparent, align: right"]Mar-18[/TD]
[TD="bgcolor: transparent, align: right"]Apr-18[/TD]
[TD="bgcolor: transparent, align: right"]May-18[/TD]
[TD="bgcolor: transparent"]etc[/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] , align: right"]106[/TD]
[TD="bgcolor: transparent"]101[/TD]
[TD="bgcolor: transparent"]Coventry[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] , align: right"]107[/TD]
[TD="bgcolor: transparent"]102[/TD]
[TD="bgcolor: transparent"]Liverpool[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D8D8D8]#D8D8D8[/URL] , align: right"]108[/TD]
[TD="bgcolor: transparent"]103[/TD]
[TD="bgcolor: transparent"]Cardiff[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="width: 676, bgcolor: transparent, colspan: 8"]Returns start at A205 and Adj at A305[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="width: 676, bgcolor: transparent, colspan: 8"]I thought that I could use INDEX-MATCH to find the numbers in A2 etc of my summary sheet, and use SUM+OFFSET to fill out the data, but really not sure what the best way is to do this summary.
[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,224,827
Messages
6,181,197
Members
453,022
Latest member
RobertV1609

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