Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default Worksheet name changes on external reference

I have a spreadsheet that summarizes information from a couple of external
workbooks. The problem is that sometimes the worksheet I am referencing has
the name NPA and sometimes it has the name VOC. (These workbooks come from
the HQ level so I can't control how the sheets are named)
I have put together a UDF that tests the workbook and returns the name of
this worksheet. However, I can't figure out how to use it in my formula on
the summary worksheet. Can someone help?
Here is the formula I am using on the summary worksheet:

=INDEX([exp.xls]NPA!$C$7:$AJ$103,MATCH($G4,[exp.xls]NPA!$C$7:$C$103,0),34)

Thanks
Mike
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Worksheet name changes on external reference

=INDEX(Indirect("[exp.xls]"&A1&"!C7:AJ103"),MATCH($G4,Indirect("[exp.xls]"&A1&"!C7:C103"),0),34)

Where A1 holds the sheet name.

--
Regards,
Tom Ogilvy


"mikebres" wrote:

I have a spreadsheet that summarizes information from a couple of external
workbooks. The problem is that sometimes the worksheet I am referencing has
the name NPA and sometimes it has the name VOC. (These workbooks come from
the HQ level so I can't control how the sheets are named)
I have put together a UDF that tests the workbook and returns the name of
this worksheet. However, I can't figure out how to use it in my formula on
the summary worksheet. Can someone help?
Here is the formula I am using on the summary worksheet:

=INDEX([exp.xls]NPA!$C$7:$AJ$103,MATCH($G4,[exp.xls]NPA!$C$7:$C$103,0),34)

Thanks
Mike

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default Worksheet name changes on external reference

Thank you, Tom. This solution works great as long as the source file is
open. However, once I close the file I get an error. So right now I am
saving my summary spreadsheet and the open source files as a workspace. Then
I load the workspace. This leaves the source files open once I close my
summary spreadsheet. This is somewhat annoying.

Is there anyway to do this with the source files closed?

"Tom Ogilvy" wrote:

=INDEX(Indirect("[exp.xls]"&A1&"!C7:AJ103"),MATCH($G4,Indirect("[exp.xls]"&A1&"!C7:C103"),0),34)

Where A1 holds the sheet name.

--
Regards,
Tom Ogilvy


"mikebres" wrote:

I have a spreadsheet that summarizes information from a couple of external
workbooks. The problem is that sometimes the worksheet I am referencing has
the name NPA and sometimes it has the name VOC. (These workbooks come from
the HQ level so I can't control how the sheets are named)
I have put together a UDF that tests the workbook and returns the name of
this worksheet. However, I can't figure out how to use it in my formula on
the summary worksheet. Can someone help?
Here is the formula I am using on the summary worksheet:

=INDEX([exp.xls]NPA!$C$7:$AJ$103,MATCH($G4,[exp.xls]NPA!$C$7:$C$103,0),34)

Thanks
Mike

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
Reference external worksheet whose name is in a cell Poly4 Excel Worksheet Functions 1 July 20th 06 03:12 AM
Using cell value to reference external worksheet? tsobiech Excel Worksheet Functions 2 March 6th 06 03:11 PM
How do I build a reference to an external worksheet? Alexsalles Excel Worksheet Functions 3 December 15th 05 07:29 PM
Finding an external reference on a worksheet rmellison Excel Discussion (Misc queries) 2 October 21st 05 11:43 AM
External reference an entire worksheet Pradhan Balter Excel Programming 2 June 22nd 04 02:09 PM


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