Hello,
Attached an example - open it before continuing to read, should be easier to understand.
Check the "ProfitLoss" Worksheet.
As you can see, currently Ive got 2 years on it - both fetch data from 2 cashflow sheets, which on the other hand fetch data from the PrSales sheets.
The PrSales sheets have a list of products, each with their cost and selling price. The numbers apart from those represent how much of a product has been sold in a certain month.
Scrolling to the right shows some totals of each product per month (basically, selling price * number sold).
What I want to do:
I have a Macro, which is run each year, to automatically generate a new 'PrSalesXX' sheet, where XX represents the last 2 digits of the year, so 2012 would be PrSales12.
Also, I have another macro, run once a year, which generates a new 'CashFlow_X' sheet, where X represents the last digit of the year - 2008 is CashFlow_8, but 2012 will obviously be CashFlow_12.
I want something similar to happen on the profitLoss sheet. Basically, I want a new column to be added for the next year automatically (i guess I could just integrate that in the macro I use to generate a new sheet).
The problem comes here: If you notice, the current years in the profit loss sheet take values from CashFlow_8 and CashFlow_9 respectively. So, if lets say a new column is added saying 2011, I would need all the formulas below it to be changed over to 'CashFlow_11'.
What do you suggest I do?
In fact, if its too complicated, I would be happy to know if theres any macro I can use to "Mass" change part of a formula in a certain column. So basically, I would run it on the 2011 column, and change all values sayin CashFlow_9 to CashFlow_11 for example.
Bookmarks