Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Ken Cobler
 
Posts: n/a
Default Using INDIRECT to refer to different workbooks

I am getting messed up on the grammar for this function. I am trying to
refer to a Worksheet called "125" - - which is on a different (opened)
Workbook.

How do I use the INDIRECT function so that it will go to a specific
Workbook, pick the correct '125' tab on that workbook, and return to me a
fixed cell value?

Thanks for your help. Excel Help is not clear about the grammar.

Thanks.
  #2   Report Post  
Govind
 
Posts: n/a
Default

Hi,

Try

=INDIRECT("'[temp.xls]125'!"&"A1")

Replace the 'temp.xls' with the file name you need and replace the cell
A1 with the cell you need.

Note that Indirect works only when the source workbook is open.

Govind.

Ken Cobler wrote:
I am getting messed up on the grammar for this function. I am trying to
refer to a Worksheet called "125" - - which is on a different (opened)
Workbook.

How do I use the INDIRECT function so that it will go to a specific
Workbook, pick the correct '125' tab on that workbook, and return to me a
fixed cell value?

Thanks for your help. Excel Help is not clear about the grammar.

Thanks.

  #3   Report Post  
Biff
 
Posts: n/a
Default

Hi!

You don't need to use Indirect unless you are using other cells to hold
references to the other workbook.

For example:

You want to return the value of cell A1 on Sheet!125 in workbook file_name.

You might do something like this:

A1 = file_name
B1 = 125

=INDIRECT("'["&A1&".xls]"&B1&"'!A1")

OR

=INDIRECT("'[file_name.xls]"&B1&"'!A1")

If you don't have references to the other wb in other cells, you could just
use this:

='[file_name.xls]125'!$A$1

The above can be used whether the other file is open or not. If it was
closed, you'd have to include the full path in the formula:

='C:\path\[file_name.xls]125'!$A$1

The big disadvantage to Indirect is that it requires the other file be open.

Biff

"Ken Cobler" <Ken wrote in message
...
I am getting messed up on the grammar for this function. I am trying to
refer to a Worksheet called "125" - - which is on a different (opened)
Workbook.

How do I use the INDIRECT function so that it will go to a specific
Workbook, pick the correct '125' tab on that workbook, and return to me a
fixed cell value?

Thanks for your help. Excel Help is not clear about the grammar.

Thanks.



  #4   Report Post  
Ken Cobler
 
Posts: n/a
Default

Thank you. Your example =INDIRECT("'[file_name.xls]"&B1&"'!A1") works just
fine.

I have two separate workbooks. I am making a matrix which will always refer
to the other workbook (so the first part of the address is fixed), but each
line of the matrix will refer to the same cell location in a number of
identical worksheets. Your answer gives me what I was looking for. Thanks
again.


"Biff" wrote:

Hi!

You don't need to use Indirect unless you are using other cells to hold
references to the other workbook.

For example:

You want to return the value of cell A1 on Sheet!125 in workbook file_name.

You might do something like this:

A1 = file_name
B1 = 125

=INDIRECT("'["&A1&".xls]"&B1&"'!A1")

OR

=INDIRECT("'[file_name.xls]"&B1&"'!A1")

If you don't have references to the other wb in other cells, you could just
use this:

='[file_name.xls]125'!$A$1

The above can be used whether the other file is open or not. If it was
closed, you'd have to include the full path in the formula:

='C:\path\[file_name.xls]125'!$A$1

The big disadvantage to Indirect is that it requires the other file be open.

Biff

"Ken Cobler" <Ken wrote in message
...
I am getting messed up on the grammar for this function. I am trying to
refer to a Worksheet called "125" - - which is on a different (opened)
Workbook.

How do I use the INDIRECT function so that it will go to a specific
Workbook, pick the correct '125' tab on that workbook, and return to me a
fixed cell value?

Thanks for your help. Excel Help is not clear about the grammar.

Thanks.




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
referencing named formula using INDIRECT function [email protected] Excel Worksheet Functions 19 May 11th 05 09:48 AM
Consolidate different sheets to different workbooks markx Excel Worksheet Functions 3 April 26th 05 03:30 PM
Linking Workbooks Dede McEachern Excel Worksheet Functions 0 January 21st 05 08:27 PM
Tools/Compare and Merge Workbooks - Excel 2003 Pro Laura Excel Worksheet Functions 1 January 3rd 05 05:45 PM
Workbooks...I'll try this again... Markster Excel Discussion (Misc queries) 10 December 7th 04 10:12 PM


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