Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default dynamic substitution of worksheet reference

Hi all,

I am looking for a way to do dynamic substitution of the worksheet
reference in a formula. For example, let's say I have 50 worksheets of
data (names 'DATA1' through 'DATA50'. Each worksheet is identical in
layout, but with different data. Now I want a summary sheet (named
'SUMMARY') that extracts certain data from each worksheet and each
column on the summary is for a different data set.

What I want is to have a string with a page name in one cell,
and below that formula that get the page name string from above and
substitute that into a worksheet/cell reference.

Example:

Cell 'SUMMARY!A1' contains 'DATA3'
Cell 'SUMMARY!A2' contains '=a1!$d$10' (without the quotes, of course)

Now the formula should sustitute the string DATA3 for the a1 reference
and we should end up with whatever data is stored in DATA3!D10.

Now I should be able to copy the formula in SUMMARY!A2 to the right,
and put any valid page name in the cell above to return the D10 value
for that data set.

Any ideas?

Kind regards,

Bram Weisman



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default dynamic substitution of worksheet reference

Cell 'SUMMARY!A2' should contain =INDIRECT(a1&"!$d$10")

--
David Hager
Excel MVP


"bramweisman" wrote in message
...
Hi all,

I am looking for a way to do dynamic substitution of the worksheet
reference in a formula. For example, let's say I have 50 worksheets of
data (names 'DATA1' through 'DATA50'. Each worksheet is identical in
layout, but with different data. Now I want a summary sheet (named
'SUMMARY') that extracts certain data from each worksheet and each
column on the summary is for a different data set.

What I want is to have a string with a page name in one cell,
and below that formula that get the page name string from above and
substitute that into a worksheet/cell reference.

Example:

Cell 'SUMMARY!A1' contains 'DATA3'
Cell 'SUMMARY!A2' contains '=a1!$d$10' (without the quotes, of course)

Now the formula should sustitute the string DATA3 for the a1 reference
and we should end up with whatever data is stored in DATA3!D10.

Now I should be able to copy the formula in SUMMARY!A2 to the right,
and put any valid page name in the cell above to return the D10 value
for that data set.

Any ideas?

Kind regards,

Bram Weisman



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default dynamic substitution of worksheet reference

Hi Bram,

=INDIRECT(A1&"!D10")

HTH
Anders Silvén

"bramweisman" skrev i meddelandet
...
Hi all,

I am looking for a way to do dynamic substitution of the worksheet
reference in a formula. For example, let's say I have 50 worksheets of
data (names 'DATA1' through 'DATA50'. Each worksheet is identical in
layout, but with different data. Now I want a summary sheet (named
'SUMMARY') that extracts certain data from each worksheet and each
column on the summary is for a different data set.

What I want is to have a string with a page name in one cell,
and below that formula that get the page name string from above and
substitute that into a worksheet/cell reference.

Example:

Cell 'SUMMARY!A1' contains 'DATA3'
Cell 'SUMMARY!A2' contains '=a1!$d$10' (without the quotes, of course)

Now the formula should sustitute the string DATA3 for the a1 reference
and we should end up with whatever data is stored in DATA3!D10.

Now I should be able to copy the formula in SUMMARY!A2 to the right,
and put any valid page name in the cell above to return the D10 value
for that data set.

Any ideas?

Kind regards,

Bram Weisman



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default dynamic substitution of worksheet reference

Thanks guys! INDIRECT is exactly what I needed.

Best wishes,

Bram Weisman



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

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 Reference Tyler.C.Brown New Users to Excel 7 July 24th 09 11:58 PM
How do i set up a 3d reference where one cell reference is dynamic SmilingSteve Excel Discussion (Misc queries) 15 March 14th 08 05:05 AM
Dynamic reference to another tab name Angus Excel Worksheet Functions 5 February 9th 07 05:41 PM
dynamic worksheet reference bmccall17 Excel Worksheet Functions 1 September 19th 05 06:46 PM
Dynamic reference to sheet name Darien0104 Excel Worksheet Functions 1 May 8th 05 09:41 AM


All times are GMT +1. The time now is 10:27 AM.

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

About Us

"It's about Microsoft Excel"