Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 181
Default Index and References within a workbook

I am using the following formula below that works fine however I would like
to modify it such that rather than tell it to go to worksheet 1401
(INDEX('[0910-1400-WB-Actual.xlsx]1401'!$D$11:$Q$135) I would like it to say
look for the any sheet in the workbook using a reference say B1.

Note: in B1: b12 say I would list all the tabs in the workbook.. Is this
possible

thanks



=IF(OR(F$1=1,INDEX('[0910-1400-WB-Actual.xlsx]1401'!$D$11:$Q$135,MATCH("TOTAL
FUEL",'[0910-1400-WB-Actual.xlsx]1401'!$C$11:$C$135,0),MATCH(F$1,'[0910-1400-WB-Actual.xlsx]1401'!$D$9:$Q$9,0))=0,0),INDEX('[0910-1400-WB-Actual.xlsx]1401'!$D$11:$Q$135,MATCH("TOTAL
FUEL",'[0910-1400-WB-Actual.xlsx]1401'!$C$11:$C$135,0),MATCH(F$1,'[0910-1400-WB-Actual.xlsx]1401'!$D$9:$Q$9,0)),INDEX('[0910-1400-WB-Actual.xlsx]1401'!$D$11:$Q$135,MATCH("TOTAL
FUEL",'[0910-1400-WB-Actual.xlsx]1401'!$C$11:$C$135,0),MATCH(F$1,'[0910-1400-WB-Actual.xlsx]1401'!$D$9:$Q$9,0))-INDEX('[0910-1400-WB-Actual.xlsx]1401'!$D$11:$Q$135,MATCH("TOTAL
FUEL",'[0910-1400-WB-Actual.xlsx]1401'!$C$11:$C$135,0),MATCH(F$1-1,'[0910-1400-WB-Actual.xlsx]1401'!$D$9:$Q$9,0)))
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Index and References within a workbook

Wherever you have this in your formula:

'[0910-1400-WB-Actual.xlsx]1401'!

you would need to change it to:

INDIRECT("'[0910-1400-WB-Actual.xlsx]"&B1&"'!

and at the end of each address range you will need to add:

")

So, for example, the following:

INDEX('[0910-1400-WB-Actual.xlsx]1401'!$D$11:$Q$135,MATCH...etc

will become:

INDEX(INDIRECT("'[0910-1400-WB-Actual.xlsx]"&B1&"'!$D$11:$Q
$135"),MATCH...etc

and then you can just put a sheet name in B1 and the formula will look
at that sheet. If the formula is on row 1 then you can copy it down to
row 12 to pick up each sheet name on each row.

Hope this helps.

Pete

On Nov 17, 7:40*pm, Curtis wrote:
I am using the following formula below that works fine however I would like
to modify it such that rather than tell it to go to worksheet 1401
(INDEX('[0910-1400-WB-Actual.xlsx]1401'!$D$11:$Q$135) I would like it to say
look for the any sheet in the workbook using a reference say B1.

Note: in B1: b12 say I would list all the tabs in the workbook.. Is this
possible

thanks

=IF(OR(F$1=1,INDEX('[0910-1400-WB-Actual.xlsx]1401'!$D$11:$Q$135,MATCH("TOT*AL
FUEL",'[0910-1400-WB-Actual.xlsx]1401'!$C$11:$C$135,0),MATCH(F$1,'[0910-140*0-WB-Actual.xlsx]1401'!$D$9:$Q$9,0))=0,0),INDEX('[0910-1400-WB-Actual.xlsx]*1401'!$D$11:$Q$135,MATCH("TOTAL
FUEL",'[0910-1400-WB-Actual.xlsx]1401'!$C$11:$C$135,0),MATCH(F$1,'[0910-140*0-WB-Actual.xlsx]1401'!$D$9:$Q$9,0)),INDEX('[0910-1400-WB-Actual.xlsx]1401'*!$D$11:$Q$135,MATCH("TOTAL
FUEL",'[0910-1400-WB-Actual.xlsx]1401'!$C$11:$C$135,0),MATCH(F$1,'[0910-140*0-WB-Actual.xlsx]1401'!$D$9:$Q$9,0))-INDEX('[0910-1400-WB-Actual.xlsx]1401'*!$D$11:$Q$135,MATCH("TOTAL
FUEL",'[0910-1400-WB-Actual.xlsx]1401'!$C$11:$C$135,0),MATCH(F$1-1,'[0910-1*400-WB-Actual.xlsx]1401'!$D$9:$Q$9,0)))


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Index and References within a workbook

I should have pointed out that INDIRECT will only work with open
workbooks (which your formula implies that you have, as you do not
show the full path), but if the file 0910-1400-WB-Actual.xlsx is
closed then you will get errors.

Pete

On Nov 17, 8:17*pm, Pete_UK wrote:
Wherever you have this in your formula:

'[0910-1400-WB-Actual.xlsx]1401'!

you would need to change it to:

INDIRECT("'[0910-1400-WB-Actual.xlsx]"&B1&"'!

and at the end of each address range you will need to add:

")

So, for example, the following:

INDEX('[0910-1400-WB-Actual.xlsx]1401'!$D$11:$Q$135,MATCH...etc

will become:

INDEX(INDIRECT("'[0910-1400-WB-Actual.xlsx]"&B1&"'!$D$11:$Q
$135"),MATCH...etc

and then you can just put a sheet name in B1 and the formula will look
at that sheet. If the formula is on row 1 then you can copy it down to
row 12 to pick up each sheet name on each row.

Hope this helps.

Pete

On Nov 17, 7:40*pm, Curtis wrote:



I am using the following formula below that works fine however I would like
to modify it such that rather than tell it to go to worksheet 1401
(INDEX('[0910-1400-WB-Actual.xlsx]1401'!$D$11:$Q$135) I would like it to say
look for the any sheet in the workbook using a reference say B1.


Note: in B1: b12 say I would list all the tabs in the workbook.. Is this
possible


thanks


=IF(OR(F$1=1,INDEX('[0910-1400-WB-Actual.xlsx]1401'!$D$11:$Q$135,MATCH("TOT**AL
FUEL",'[0910-1400-WB-Actual.xlsx]1401'!$C$11:$C$135,0),MATCH(F$1,'[0910-140**0-WB-Actual.xlsx]1401'!$D$9:$Q$9,0))=0,0),INDEX('[0910-1400-WB-Actual.xlsx*]*1401'!$D$11:$Q$135,MATCH("TOTAL
FUEL",'[0910-1400-WB-Actual.xlsx]1401'!$C$11:$C$135,0),MATCH(F$1,'[0910-140**0-WB-Actual.xlsx]1401'!$D$9:$Q$9,0)),INDEX('[0910-1400-WB-Actual.xlsx]1401*'*!$D$11:$Q$135,MATCH("TOTAL
FUEL",'[0910-1400-WB-Actual.xlsx]1401'!$C$11:$C$135,0),MATCH(F$1,'[0910-140**0-WB-Actual.xlsx]1401'!$D$9:$Q$9,0))-INDEX('[0910-1400-WB-Actual.xlsx]1401*'*!$D$11:$Q$135,MATCH("TOTAL
FUEL",'[0910-1400-WB-Actual.xlsx]1401'!$C$11:$C$135,0),MATCH(F$1-1,'[0910-1**400-WB-Actual.xlsx]1401'!$D$9:$Q$9,0)))- Hide quoted text -


- Show quoted text -


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 181
Default Index and References within a workbook

Trying to avoid indirect as opening the source files is not feasible.

Thanks

"Pete_UK" wrote:

I should have pointed out that INDIRECT will only work with open
workbooks (which your formula implies that you have, as you do not
show the full path), but if the file 0910-1400-WB-Actual.xlsx is
closed then you will get errors.

Pete

On Nov 17, 8:17 pm, Pete_UK wrote:
Wherever you have this in your formula:

'[0910-1400-WB-Actual.xlsx]1401'!

you would need to change it to:

INDIRECT("'[0910-1400-WB-Actual.xlsx]"&B1&"'!

and at the end of each address range you will need to add:

")

So, for example, the following:

INDEX('[0910-1400-WB-Actual.xlsx]1401'!$D$11:$Q$135,MATCH...etc

will become:

INDEX(INDIRECT("'[0910-1400-WB-Actual.xlsx]"&B1&"'!$D$11:$Q
$135"),MATCH...etc

and then you can just put a sheet name in B1 and the formula will look
at that sheet. If the formula is on row 1 then you can copy it down to
row 12 to pick up each sheet name on each row.

Hope this helps.

Pete

On Nov 17, 7:40 pm, Curtis wrote:



I am using the following formula below that works fine however I would like
to modify it such that rather than tell it to go to worksheet 1401
(INDEX('[0910-1400-WB-Actual.xlsx]1401'!$D$11:$Q$135) I would like it to say
look for the any sheet in the workbook using a reference say B1.


Note: in B1: b12 say I would list all the tabs in the workbook.. Is this
possible


thanks


=IF(OR(F$1=1,INDEX('[0910-1400-WB-Actual.xlsx]1401'!$D$11:$Q$135,MATCH("TOTÂ*Â*AL
FUEL",'[0910-1400-WB-Actual.xlsx]1401'!$C$11:$C$135,0),MATCH(F$1,'[0910-140Â*Â*0-WB-Actual.xlsx]1401'!$D$9:$Q$9,0))=0,0),INDEX('[0910-1400-WB-Actual.xlsxÂ*]Â*1401'!$D$11:$Q$135,MATCH("TOTAL
FUEL",'[0910-1400-WB-Actual.xlsx]1401'!$C$11:$C$135,0),MATCH(F$1,'[0910-140Â*Â*0-WB-Actual.xlsx]1401'!$D$9:$Q$9,0)),INDEX('[0910-1400-WB-Actual.xlsx]1401Â*'Â*!$D$11:$Q$135,MATCH("TOTAL
FUEL",'[0910-1400-WB-Actual.xlsx]1401'!$C$11:$C$135,0),MATCH(F$1,'[0910-140Â*Â*0-WB-Actual.xlsx]1401'!$D$9:$Q$9,0))-INDEX('[0910-1400-WB-Actual.xlsx]1401Â*'Â*!$D$11:$Q$135,MATCH("TOTAL
FUEL",'[0910-1400-WB-Actual.xlsx]1401'!$C$11:$C$135,0),MATCH(F$1-1,'[0910-1Â*Â*400-WB-Actual.xlsx]1401'!$D$9:$Q$9,0)))- Hide quoted text -


- Show quoted text -


.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Index and References within a workbook

Well, if the files are closed then your formula will need to show the
full path in addition to the filenames.

Pete

On Nov 17, 9:05*pm, Curtis wrote:
Trying to avoid indirect as opening the source files is not feasible.

Thanks



"Pete_UK" wrote:
I should have pointed out that INDIRECT will only work with open
workbooks (which your formula implies that you have, as you do not
show the full path), but if the file 0910-1400-WB-Actual.xlsx is
closed then you will get errors.


Pete


On Nov 17, 8:17 pm, Pete_UK wrote:
Wherever you have this in your formula:


'[0910-1400-WB-Actual.xlsx]1401'!


you would need to change it to:


INDIRECT("'[0910-1400-WB-Actual.xlsx]"&B1&"'!


and at the end of each address range you will need to add:


")


So, for example, the following:


INDEX('[0910-1400-WB-Actual.xlsx]1401'!$D$11:$Q$135,MATCH...etc


will become:


INDEX(INDIRECT("'[0910-1400-WB-Actual.xlsx]"&B1&"'!$D$11:$Q
$135"),MATCH...etc


and then you can just put a sheet name in B1 and the formula will look
at that sheet. If the formula is on row 1 then you can copy it down to
row 12 to pick up each sheet name on each row.


Hope this helps.


Pete


On Nov 17, 7:40 pm, Curtis wrote:


I am using the following formula below that works fine however I would like
to modify it such that rather than tell it to go to worksheet 1401
(INDEX('[0910-1400-WB-Actual.xlsx]1401'!$D$11:$Q$135) I would like it to say
look for the any sheet in the workbook using a reference say B1.


Note: in B1: b12 say I would list all the tabs in the workbook.. Is this
possible


thanks


=IF(OR(F$1=1,INDEX('[0910-1400-WB-Actual.xlsx]1401'!$D$11:$Q$135,MATCH("TOT***AL
FUEL",'[0910-1400-WB-Actual.xlsx]1401'!$C$11:$C$135,0),MATCH(F$1,'[0910-140***0-WB-Actual.xlsx]1401'!$D$9:$Q$9,0))=0,0),INDEX('[0910-1400-WB-Actual.xls*x*]*1401'!$D$11:$Q$135,MATCH("TOTAL
FUEL",'[0910-1400-WB-Actual.xlsx]1401'!$C$11:$C$135,0),MATCH(F$1,'[0910-140***0-WB-Actual.xlsx]1401'!$D$9:$Q$9,0)),INDEX('[0910-1400-WB-Actual.xlsx]140*1*'*!$D$11:$Q$135,MATCH("TOTAL
FUEL",'[0910-1400-WB-Actual.xlsx]1401'!$C$11:$C$135,0),MATCH(F$1,'[0910-140***0-WB-Actual.xlsx]1401'!$D$9:$Q$9,0))-INDEX('[0910-1400-WB-Actual.xlsx]140*1*'*!$D$11:$Q$135,MATCH("TOTAL
FUEL",'[0910-1400-WB-Actual.xlsx]1401'!$C$11:$C$135,0),MATCH(F$1-1,'[0910-1***400-WB-Actual.xlsx]1401'!$D$9:$Q$9,0)))- Hide quoted text -


- Show quoted text -


.- Hide quoted text -


- Show quoted text -


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
workbook references Russell Hampton Excel Worksheet Functions 2 November 26th 08 07:06 PM
External Workbook References and Functions JMSatMetro Excel Discussion (Misc queries) 1 November 1st 07 09:51 PM
OFFSET and external workbook references Dave F[_2_] Excel Discussion (Misc queries) 3 October 25th 07 04:36 PM
Help on index addressing using variable sheets & cell references Greggers Excel Worksheet Functions 3 September 4th 07 02:38 PM
Relative workbook references? [email protected] Excel Worksheet Functions 0 February 20th 07 05:44 PM


All times are GMT +1. The time now is 09:26 AM.

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"