Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 217
Default Use Worksheet Name in a Formula

Hi,

I need to try and automate the updating of a spreadsheet as much as possible
and would like to do the following... Does anyone know if this is possible?

Basically I have a workbook called 'Scorecard.xls' - it has worksheets named
after markets (e.g. UK, Austria etc) and I need to pull data from another
worksheet named 'Results.xls' which also has equally named market worksheets
(e.g. UK, Austria etc).

So, for example I have the following formula in a cell on the UK worksheet
in 'Scorecard.xls'.

='C:\Files\[Results.xls]UK'!$R$30

I need to replicate this for many markets and would love to just duplicate
the worksheet and change the market name in cell A1 (e.g. it would read UK)
and it would use this to point to the correct market worksheet in the
Results.xls workbook.

Any ideas how I can do this?

Thanks,
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default Use Worksheet Name in a Formula

Look in HELP for the INDIRECT() function

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Louise" wrote in message ...
| Hi,
|
| I need to try and automate the updating of a spreadsheet as much as possible
| and would like to do the following... Does anyone know if this is possible?
|
| Basically I have a workbook called 'Scorecard.xls' - it has worksheets named
| after markets (e.g. UK, Austria etc) and I need to pull data from another
| worksheet named 'Results.xls' which also has equally named market worksheets
| (e.g. UK, Austria etc).
|
| So, for example I have the following formula in a cell on the UK worksheet
| in 'Scorecard.xls'.
|
| ='C:\Files\[Results.xls]UK'!$R$30
|
| I need to replicate this for many markets and would love to just duplicate
| the worksheet and change the market name in cell A1 (e.g. it would read UK)
| and it would use this to point to the correct market worksheet in the
| Results.xls workbook.
|
| Any ideas how I can do this?
|
| Thanks,


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 217
Default Use Worksheet Name in a Formula

Ok - I have taken a look, but i'm still not sure how I use this within my
current formula?

Can you advise where I can position this function within this formula to
replace the UK with the contents of cell A1?

='C:\Files\[Results.xls]UK'!$R$30

Thanks!


"Niek Otten" wrote:

Look in HELP for the INDIRECT() function

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Louise" wrote in message ...
| Hi,
|
| I need to try and automate the updating of a spreadsheet as much as possible
| and would like to do the following... Does anyone know if this is possible?
|
| Basically I have a workbook called 'Scorecard.xls' - it has worksheets named
| after markets (e.g. UK, Austria etc) and I need to pull data from another
| worksheet named 'Results.xls' which also has equally named market worksheets
| (e.g. UK, Austria etc).
|
| So, for example I have the following formula in a cell on the UK worksheet
| in 'Scorecard.xls'.
|
| ='C:\Files\[Results.xls]UK'!$R$30
|
| I need to replicate this for many markets and would love to just duplicate
| the worksheet and change the market name in cell A1 (e.g. it would read UK)
| and it would use this to point to the correct market worksheet in the
| Results.xls workbook.
|
| Any ideas how I can do this?
|
| Thanks,



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Use Worksheet Name in a Formula

"='C:\Files\[Results.xls]" & A1 & "'!$R$30"

"Louise" wrote:

Ok - I have taken a look, but i'm still not sure how I use this within my
current formula?

Can you advise where I can position this function within this formula to
replace the UK with the contents of cell A1?

='C:\Files\[Results.xls]UK'!$R$30

Thanks!


"Niek Otten" wrote:

Look in HELP for the INDIRECT() function

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Louise" wrote in message ...
| Hi,
|
| I need to try and automate the updating of a spreadsheet as much as possible
| and would like to do the following... Does anyone know if this is possible?
|
| Basically I have a workbook called 'Scorecard.xls' - it has worksheets named
| after markets (e.g. UK, Austria etc) and I need to pull data from another
| worksheet named 'Results.xls' which also has equally named market worksheets
| (e.g. UK, Austria etc).
|
| So, for example I have the following formula in a cell on the UK worksheet
| in 'Scorecard.xls'.
|
| ='C:\Files\[Results.xls]UK'!$R$30
|
| I need to replicate this for many markets and would love to just duplicate
| the worksheet and change the market name in cell A1 (e.g. it would read UK)
| and it would use this to point to the correct market worksheet in the
| Results.xls workbook.
|
| Any ideas how I can do this?
|
| Thanks,



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default Use Worksheet Name in a Formula

=INDIRECT("C:\Files\[Results]"&A1&"!$R$30")

Since you don't have spaces in your file name (Good!) you don't need the apostrophes

--
Kind regards,

Niek Otten
Microsoft MVP - Excel


"Louise" wrote in message ...
| Ok - I have taken a look, but i'm still not sure how I use this within my
| current formula?
|
| Can you advise where I can position this function within this formula to
| replace the UK with the contents of cell A1?
|
| ='C:\Files\[Results.xls]UK'!$R$30
|
| Thanks!
|
|
| "Niek Otten" wrote:
|
| Look in HELP for the INDIRECT() function
|
| --
| Kind regards,
|
| Niek Otten
| Microsoft MVP - Excel
|
| "Louise" wrote in message ...
| | Hi,
| |
| | I need to try and automate the updating of a spreadsheet as much as possible
| | and would like to do the following... Does anyone know if this is possible?
| |
| | Basically I have a workbook called 'Scorecard.xls' - it has worksheets named
| | after markets (e.g. UK, Austria etc) and I need to pull data from another
| | worksheet named 'Results.xls' which also has equally named market worksheets
| | (e.g. UK, Austria etc).
| |
| | So, for example I have the following formula in a cell on the UK worksheet
| | in 'Scorecard.xls'.
| |
| | ='C:\Files\[Results.xls]UK'!$R$30
| |
| | I need to replicate this for many markets and would love to just duplicate
| | the worksheet and change the market name in cell A1 (e.g. it would read UK)
| | and it would use this to point to the correct market worksheet in the
| | Results.xls workbook.
| |
| | Any ideas how I can do this?
| |
| | Thanks,
|
|
|




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 217
Default Use Worksheet Name in a Formula

Sorry to ask, but if I did have spaces in my filename where would I be
inserting apostrophes?

Thanks :)

"Niek Otten" wrote:

=INDIRECT("C:\Files\[Results]"&A1&"!$R$30")

Since you don't have spaces in your file name (Good!) you don't need the apostrophes

--
Kind regards,

Niek Otten
Microsoft MVP - Excel


"Louise" wrote in message ...
| Ok - I have taken a look, but i'm still not sure how I use this within my
| current formula?
|
| Can you advise where I can position this function within this formula to
| replace the UK with the contents of cell A1?
|
| ='C:\Files\[Results.xls]UK'!$R$30
|
| Thanks!
|
|
| "Niek Otten" wrote:
|
| Look in HELP for the INDIRECT() function
|
| --
| Kind regards,
|
| Niek Otten
| Microsoft MVP - Excel
|
| "Louise" wrote in message ...
| | Hi,
| |
| | I need to try and automate the updating of a spreadsheet as much as possible
| | and would like to do the following... Does anyone know if this is possible?
| |
| | Basically I have a workbook called 'Scorecard.xls' - it has worksheets named
| | after markets (e.g. UK, Austria etc) and I need to pull data from another
| | worksheet named 'Results.xls' which also has equally named market worksheets
| | (e.g. UK, Austria etc).
| |
| | So, for example I have the following formula in a cell on the UK worksheet
| | in 'Scorecard.xls'.
| |
| | ='C:\Files\[Results.xls]UK'!$R$30
| |
| | I need to replicate this for many markets and would love to just duplicate
| | the worksheet and change the market name in cell A1 (e.g. it would read UK)
| | and it would use this to point to the correct market worksheet in the
| | Results.xls workbook.
| |
| | Any ideas how I can do this?
| |
| | Thanks,
|
|
|



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default Use Worksheet Name in a Formula

Where you have them now (I think, I always avoid spaces in File names and Sheet names).

Just try!

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Louise" wrote in message ...
| Sorry to ask, but if I did have spaces in my filename where would I be
| inserting apostrophes?
|
| Thanks :)
|
| "Niek Otten" wrote:
|
| =INDIRECT("C:\Files\[Results]"&A1&"!$R$30")
|
| Since you don't have spaces in your file name (Good!) you don't need the apostrophes
|
| --
| Kind regards,
|
| Niek Otten
| Microsoft MVP - Excel
|
|
| "Louise" wrote in message ...
| | Ok - I have taken a look, but i'm still not sure how I use this within my
| | current formula?
| |
| | Can you advise where I can position this function within this formula to
| | replace the UK with the contents of cell A1?
| |
| | ='C:\Files\[Results.xls]UK'!$R$30
| |
| | Thanks!
| |
| |
| | "Niek Otten" wrote:
| |
| | Look in HELP for the INDIRECT() function
| |
| | --
| | Kind regards,
| |
| | Niek Otten
| | Microsoft MVP - Excel
| |
| | "Louise" wrote in message ...
| | | Hi,
| | |
| | | I need to try and automate the updating of a spreadsheet as much as possible
| | | and would like to do the following... Does anyone know if this is possible?
| | |
| | | Basically I have a workbook called 'Scorecard.xls' - it has worksheets named
| | | after markets (e.g. UK, Austria etc) and I need to pull data from another
| | | worksheet named 'Results.xls' which also has equally named market worksheets
| | | (e.g. UK, Austria etc).
| | |
| | | So, for example I have the following formula in a cell on the UK worksheet
| | | in 'Scorecard.xls'.
| | |
| | | ='C:\Files\[Results.xls]UK'!$R$30
| | |
| | | I need to replicate this for many markets and would love to just duplicate
| | | the worksheet and change the market name in cell A1 (e.g. it would read UK)
| | | and it would use this to point to the correct market worksheet in the
| | | Results.xls workbook.
| | |
| | | Any ideas how I can do this?
| | |
| | | Thanks,
| |
| |
| |
|
|
|


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Use Worksheet Name in a Formula

The function you'd want to use that's built into excel is =indirect(). But that
function returns an error if the sending workbook is closed.

Laurent Longre has an addin (morefunc.xll) at:
http://xcell05.free.fr/

That includes =indirect.ext() that may help you.

Louise wrote:

Hi,

I need to try and automate the updating of a spreadsheet as much as possible
and would like to do the following... Does anyone know if this is possible?

Basically I have a workbook called 'Scorecard.xls' - it has worksheets named
after markets (e.g. UK, Austria etc) and I need to pull data from another
worksheet named 'Results.xls' which also has equally named market worksheets
(e.g. UK, Austria etc).

So, for example I have the following formula in a cell on the UK worksheet
in 'Scorecard.xls'.

='C:\Files\[Results.xls]UK'!$R$30

I need to replicate this for many markets and would love to just duplicate
the worksheet and change the market name in cell A1 (e.g. it would read UK)
and it would use this to point to the correct market worksheet in the
Results.xls workbook.

Any ideas how I can do this?

Thanks,


--

Dave Peterson
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
Worksheet formula incorrect after copying to another worksheet Karen Excel Worksheet Functions 2 November 12th 09 01:06 AM
Formula for advance worksheet name to next worksheet name David Frank Excel Worksheet Functions 2 February 9th 08 07:51 PM
How do I take a cell in one worksheet and add it into the formula in a different worksheet in the same workbook? Lexi Excel Worksheet Functions 3 September 20th 06 05:52 PM
Fill a column in a worksheet from a formula worksheet based on the date NadiaR Excel Programming 4 March 15th 06 10:42 PM
formula/function to copy from worksheet to worksheet Jen Excel Programming 5 January 11th 05 08:22 PM


All times are GMT +1. The time now is 01:37 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"