How to fetch sales data from specific cells based on moving months

Wadebro

New Member
Joined
Jul 9, 2023
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Hello!

Trying to optimize my workflow as a boomer excel user in my business job.
Every month I get a report with hundreds of rows from different customers with 3 columns per month in this order (Gross Sales, Net Sales, Sales Quantity).
January numbers start from column H so that would mean the following:

Column H: Gross Sales
Column I: Net Sales
Column J: Sales Quantity

Each month adds another 3 columns so K, L, M for February and so on.

Simple enough. Now at the bottom of the excel data sheet there is a row with the "Overall Result" for all of the Gross Sales etc. data from all the customer rows.
My Question is the following:

How do I formulate a "=" sentence that knows how to look up the current total values of Gross Sales, Net Sales and Sales Quantity respectively and print out the number in a very simple table that has
the previos numbers summed up until the latest FULL month so that would be June as of writing this question. The Formula should for example print the sum of all "Gross Sales" data from Jan-Jun into a single cell for further use.

The idea here is to keep the master excel data updated automatically so that I wouldn't have to do so much manual work each month updating all the 20+ customers I have with each coming with hundreds of rows of data.

I've trie VLOOKUP, LOOKUP, INDEX while toying around with setting the table array and looking at MAX function to retrieve the bottom most row but I just can't get it to work.

Hopefully it was clear what I want to achieve. Thank you for taking the time to look at this and for all the help!
Mehiläinen.xlsx
HIJKLMNOPQRS
1JAN 2022FEB 2022MAR 2022APR 2022
2Gross SalesNet SalesSales QuantityGross SalesNet SalesSales QuantityGross SalesNet SalesSales QuantityGross SalesNet SalesSales Quantity
3EUREURPCEEUREURPCEEUREURPCEEUREURPCE
4
5
6
7460,00460,002460,00460,002
8176,00176,002
915,5015,50131,0031,002
10174,72174,721
11212,50212,50293,7593,751
12
13112,00112,001
14862,72862,726205,75205,752667,00667,006
15
16480,00480,006400,00400,005800,00800,0010
17230,00230,001
1862,0062,004
19
20375,00375,004
21118,40118,402
221 035,401 035,4016400,00400,0051 030,001 030,0011
23
24
25
26352,00352,004
2762,0062,004
28937,50937,5010
29118,40118,402118,40118,402
30
31
32
33
34
351 055,901 055,901262,0062,004470,40470,406
2022
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
my suggestion, if you haven't gone too far down the cross tab rabbit hole to rebuild your data table with a column for month. You're mixing data gathering and reporting in your worksheet, which initially may seem great, but leads to downstream issues when you need to change something. Here is your data, and then your data represented as a pivot table:

Book1
ABCDEFGHIJKLMNOPQRST
24ItemMonthGross SalesNet SalesSales QuantityColumn Labels
25Item1Jan-224604602JanFebMarApr
26Item2Jan-22   
27Item3Jan-2215.515.51
28Item4Jan-22174.72174.721Row LabelsGr SalesNt SalesSales QtyGr SalesNt SalesSales QtyGr SalesNt SalesSales QtyGr SalesNt SalesSales Qty
29Item5Jan-22212.5212.52Item146046020000004604602
30Item6Jan-22   Item1062624000000000
31Item7Jan-22862.72862.726Item113753754000000000
32Item8Jan-224804806Item12118.4118.42000000000
33Item9Jan-22   Item131035.41035.41640040050001030103011
34Item10Jan-2262624Item140000003523524000
35Item11Jan-223753754Item1500062624000000
36Item12Jan-22118.4118.42Item16937.5937.510000000000
37Item13Jan-221035.41035.416Item17118.4118.42000118.4118.42000
38Item14Jan-22   Item181055.91055.91262624470.4470.46000
39Item15Jan-22   Item20000000001761762
40Item16Jan-22937.5937.510Item315.515.5100000031312
41Item17Jan-22118.4118.42Item4174.72174.721000000000
42Item18Jan-221055.91055.912Item5212.5212.5293.7593.751000000
43Item1Feb-22   Item60001121121000000
44Item2Feb-22   Item7862.72862.726205.75205.7520006676676
45Item3Feb-22   Item84804806400400500080080010
46Item4Feb-22   Item90000000002302301
47Item5Feb-2293.7593.751
48Item6Feb-221121121
49Item7Feb-22205.75205.752
50Item8Feb-224004005
51Item9Feb-22   
52Item10Feb-22   
53Item11Feb-22   
54Item12Feb-22   
55Item13Feb-224004005
56Item14Feb-22   
57Item15Feb-2262624
58Item16Feb-22   
59Item17Feb-22   
60Item18Feb-2262624
61Item1Mar-22   
62Item2Mar-22   
63Item3Mar-22   
64Item4Mar-22   
65Item5Mar-22   
66Item6Mar-22   
67Item7Mar-22   
68Item8Mar-22   
69Item9Mar-22   
70Item10Mar-22   
71Item11Mar-22   
72Item12Mar-22   
73Item13Mar-22   
74Item14Mar-223523524
75Item15Mar-22   
76Item16Mar-22   
77Item17Mar-22118.4118.42
78Item18Mar-22470.4470.46
79Item1Apr-224604602
80Item2Apr-221761762
81Item3Apr-2231312
82Item4Apr-22   
83Item5Apr-22   
84Item6Apr-22   
85Item7Apr-226676676
86Item8Apr-2280080010
87Item9Apr-222302301
88Item10Apr-22   
89Item11Apr-22   
90Item12Apr-22   
91Item13Apr-221030103011
92Item14Apr-22   
93Item15Apr-22   
94Item16Apr-22   
95Item17Apr-22   
96Item18Apr-22   
wadebro
Cell Formulas
RangeFormula
C25:E96C25=IF(INDEX($B$4:$M$21,MATCH($A25,$A$4:$A$21,0),MATCH($B25&C$24,$B$1:$M$1&$B$2:$M$2,0))="","", INDEX($B$4:$M$21,MATCH($A25,$A$4:$A$21,0),MATCH($B25&C$24,$B$1:$M$1&$B$2:$M$2,0)))
 
Upvote 0
The only one that should matter is that at the bottom of the data table in column A is "Overall Result" which calculates each column's rows to the very bottom row. Like this

Mehiläinen.xlsx
ABCDEFGHIJKLMN
645Result
646Overall Result42 856,3437 376,3447932 779,0432 758,8939530 015,94
2022


I am able to get the MAXIMUM value of the best month printed into a cell by using this formula:

=SUM(MAX(CHOOSE(MONTH(TODAY())-1; H:H; K:K; N:N; Q:Q; T:T; W:W; Z:Z; AC:AC; AF:AF; AI:AI; AL:AL; AO:AO)))

But it doesnt know how to calculate all of the months together up until June. Columns H, K, N etc... Are the Gross Sales columns. I was hoping to achieve the result I wanted by calculating the maximum number of each column per month which is of course the bottom row "Overall Result" number together but this is still a bit off.
 
Upvote 0
So, this is a report and not the master data? Can you share a sample of the master data? Then share what kind of out put you want? (Are there other output objectives you want other than what you have in post #4?).
 
Upvote 0
Apologies for the confusion. I am not quite sure if I understand the specific difference between a master data and the report.
I get a massive excel file with ALL of the data including all the customers our company handles. I first use the "Analysis" tools to sort out all the customers that belong to me and make a separate excel for further use. From that excel I would need to collect "Gross Sales", "Net Sales" and "Sales Quantity" data for another excel where I collect all the data from all of my different customers.
This data I then turn into graphs and other stuff for presentation.

My goal is to make that manual workflow a lot shorter by being able to just fetch the correct sum of cell values based on the month I am in.
So for example now it's July and I would need to get the Gross Sales data from Jan-Jun. That data resides in columns H:H; K:K; N:N; Q:Q; T:T; W:W; Z:Z.
At the bottom of these columns are the "overall results" so essentially =max(H:H) so I to automate it by calculating essentially as many columns as there are months currently and summing all the overall results together.
 
Upvote 0
Okay. And you are welcome to ignore if you think this is too much work for you.
My perspective is that you are building a report from the massive data you already have. Then you want to build another report based on that report.

My take is to do everything you do up until you make the cross tab above, and then make individual reports based on that.

Again, it would be much easier if you shared your master data.
 
Upvote 0
Thank you for your patience as I am not familiar with all the terms. By master data you mean the entirety of the Data Source I have access to? I'm not sure how I can share it as it is company data and wouldn't want it "out there". Or am I completely off here on what I need to share?
 
Upvote 0
Yes, that is what I mean, and you can sanitize it. column headers are fairly important - but can be altered as needed, the other data can be dummied up. (but you would need to be sure the dummy data makes sense calculation wise).
 
Upvote 0
Yes, that is what I mean, and you can sanitize it. column headers are fairly important - but can be altered as needed, the other data can be dummied up. (but you would need to be sure the dummy data makes sense calculation wise).
and you only need columns that are necessary to the report(s) you want to create. I am pretty sure xl2bb will not copy hidden columns.
 
Upvote 0

Forum statistics

Threads
1,223,943
Messages
6,175,546
Members
452,652
Latest member
eduedu

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