View Single Post
 
Old 08-23-2023, 11:39 AM
ArviLaanemets ArviLaanemets is offline Windows 8 Office 2016
Expert
 
Join Date: May 2017
Posts: 932
ArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant future
Default

You need tables (every table on separate sheet is best solution):
Customers table where all customers are registered. Based on this table is a Named Range (e.g. nCustomers or lCustomers), used as source for data validation list to select customer in other tables;
Months table, where all months in format yyyymm from certain starting month up to current one are calculated. The formula will return empty string when it returns a month numer greater than current one. Based on this table, a Named Range (e.g. nMonths or lMonths) is created, which returns the list of not empty month numbers (you can use OFFSET function for this);
Now you can create a sales table, with columns for customer (data validation list), month (data validation list) and amount (general/numeric/money format);
And the last sheet will be for report, where at top you select the start month (using data validation list). My advice is, you define the cell where you select report month as Named Range (e.g. nReportMonth), so the reference to this cell doesn't change in formulas.
On report sheet you also create a 24 rows deep table with columns for month number (calculated from months table, starting from nRepMonth), and for amount (calculated from sales table using SUMIFS function [like =SUMIFS(SalesTable.Amount, SalesTable.MonthNumber, ReportTable.CurrentRowMonthNumber)]

Now, whenever you select any month in top of report sheet, in table there summary sales for 12 months starting from selected one are displayed.
Reply With Quote