Hi folks,
I have been given a workbook to maintain that has monthly financial data in it. Each sheet is named after the month and year ("Jan 2011", "Feb 2011", etc). I will have 12 sheets by the end of the year. I need to maintain a year-to-date (TYD) sum on each page. I would like to automate our process and allow a worksheet to compute the previous month's sheet name and automatically reference the previous month's data when doing the YTD calculation. However, when I do this I get a circular reference error.
I can create a simple example. Assume my first worksheet is named "Jan 2011." I have some data in cell A1. I copy this sheet and name the copy "Feb 2011." The new worksheet has a function in it that computes the previous month's name using CELL("filename") and some string commands. I then use the INDIRECT command to reference data on the "Jan 2011" worksheet. It is this INDIRECT command that generates the circular reference error.
I do not see where I am screwing up.
Ziggle
I have been given a workbook to maintain that has monthly financial data in it. Each sheet is named after the month and year ("Jan 2011", "Feb 2011", etc). I will have 12 sheets by the end of the year. I need to maintain a year-to-date (TYD) sum on each page. I would like to automate our process and allow a worksheet to compute the previous month's sheet name and automatically reference the previous month's data when doing the YTD calculation. However, when I do this I get a circular reference error.
I can create a simple example. Assume my first worksheet is named "Jan 2011." I have some data in cell A1. I copy this sheet and name the copy "Feb 2011." The new worksheet has a function in it that computes the previous month's name using CELL("filename") and some string commands. I then use the INDIRECT command to reference data on the "Jan 2011" worksheet. It is this INDIRECT command that generates the circular reference error.
I do not see where I am screwing up.
Ziggle