Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Dynamic Formula Generation

I am trying to dynamically change a formula based on a cell on a worksheet.

I have 2 different workbooks I am working with. One is a data workbook and
has a worksheet for each month (January through December).

The second workbook is used for reporting. The reporting is only going back
12 months. The reporting is set up in a table that has the last 12 months as
column headings. In this workbook, I use array formulas to pull the data that
I need from the appropriate worksheet in the data workbook (for the January
report, I reference the January tab in the data workbook, etc...).

I am trying to automate these reports. I want to have a cell where the user
enters the current month of reporting. When the user does that, I need the
formulas to change.

So, lets assume this month is August. When I open the reports, the last
column in the report is July. In my new model the user would enter the month
"August" in a cell and the old formulas that referenced the July worksheet in
the data workbook would now automatically change to August.

Does anyone know how I can accomplish this?
  #2   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Dynamic Formula Generation

You could use Indirect and replace the sheet name with a reference to a cell.
For example, where cell A1 is "August"

=INDIRECT("[Book1]"&A1&"!C5")


"dbaucom" wrote:

I am trying to dynamically change a formula based on a cell on a worksheet.

I have 2 different workbooks I am working with. One is a data workbook and
has a worksheet for each month (January through December).

The second workbook is used for reporting. The reporting is only going back
12 months. The reporting is set up in a table that has the last 12 months as
column headings. In this workbook, I use array formulas to pull the data that
I need from the appropriate worksheet in the data workbook (for the January
report, I reference the January tab in the data workbook, etc...).

I am trying to automate these reports. I want to have a cell where the user
enters the current month of reporting. When the user does that, I need the
formulas to change.

So, lets assume this month is August. When I open the reports, the last
column in the report is July. In my new model the user would enter the month
"August" in a cell and the old formulas that referenced the July worksheet in
the data workbook would now automatically change to August.

Does anyone know how I can accomplish this?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Formula with Dynamic Address dmz_asdf Excel Worksheet Functions 7 December 15th 06 07:13 PM
Dynamic chart generation: Run time Error '1004: Method 'Cells' of object'_Global' fai Ajay_N Charts and Charting in Excel 1 August 15th 06 03:54 AM
Help with copying dynamic column selected based on remote cell value and dynamic formula fill ers Charts and Charting in Excel 0 March 1st 06 01:05 AM
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM
Dynamic Chart Generation jonwatts Charts and Charting in Excel 2 October 15th 05 02:03 PM


All times are GMT +1. The time now is 06:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"