Calculate Only for Periods Before 01/01/2000
A demand planner's data view includes rows for actual sales data and sales history. Actual sales data is available until the end of last year. The current period is January. The planner wants to store actual sales data up until the end of the previous year in the sales history row where it can be utilized for forecasting into the future. For this purpose, he uses a macro that checks the date of each column (period) and, for the periods prior to this year, copies the data from the actual sales row to the sales history row.
In the example, row 1 represents sales history and row 2 represents actual sales data.