Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 44
Default Indirect function problem

I have an inherited a workbook with numerous sheets (tabs) named in the
format of last name,first initial (for example: Jones,R -- there's no space
between the last name and first initial, just the comma). I have a brief
macro that lists these worksheet names in column A.
I am attempting to collect several columns summary data from all the
worksheets by using the formula =INDIRECT(A1&"!$A$7") (as an example) and
copying it down column B. The result is #REF! . It appears that the comma
in the worksheet names is causing the #REF! error message. I don't
understand why this is occurring. Is there a way I can correct for this in
the formula without going thru the long process of renaming each of the
numerous worksheet tabs?
Or if there is a way to accomplish this through VBA, let me know if I should
repost in the Excel Programming newsgroup. I'm not too skilled in VBA and
would prefer to modify the formula, if possible.
Any help will be greatly appreciated.
Jack


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Indirect function problem

Try it like this:

=INDIRECT("'"&A1&"'!A7")

--
Biff
Microsoft Excel MVP


"jack" wrote in message
...
I have an inherited a workbook with numerous sheets (tabs) named in the
format of last name,first initial (for example: Jones,R -- there's no
space
between the last name and first initial, just the comma). I have a brief
macro that lists these worksheet names in column A.
I am attempting to collect several columns summary data from all the
worksheets by using the formula =INDIRECT(A1&"!$A$7") (as an example) and
copying it down column B. The result is #REF! . It appears that the
comma
in the worksheet names is causing the #REF! error message. I don't
understand why this is occurring. Is there a way I can correct for this
in
the formula without going thru the long process of renaming each of the
numerous worksheet tabs?
Or if there is a way to accomplish this through VBA, let me know if I
should
repost in the Excel Programming newsgroup. I'm not too skilled in VBA and
would prefer to modify the formula, if possible.
Any help will be greatly appreciated.
Jack




  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,805
Default Indirect function problem

Use
=INDIRECT("'" & A1 &"'!$A$7")

The string within INDIRECT() should evaluate to
'Jones,R'!$A$7

You need to put the sheetname within '' like this.

Let us know how it goes.

'Sheet Name' if it contains a space or comma etc...


"jack" wrote:

I have an inherited a workbook with numerous sheets (tabs) named in the
format of last name,first initial (for example: Jones,R -- there's no space
between the last name and first initial, just the comma). I have a brief
macro that lists these worksheet names in column A.
I am attempting to collect several columns summary data from all the
worksheets by using the formula =INDIRECT(A1&"!$A$7") (as an example) and
copying it down column B. The result is #REF! . It appears that the comma
in the worksheet names is causing the #REF! error message. I don't
understand why this is occurring. Is there a way I can correct for this in
the formula without going thru the long process of renaming each of the
numerous worksheet tabs?
Or if there is a way to accomplish this through VBA, let me know if I should
repost in the Excel Programming newsgroup. I'm not too skilled in VBA and
would prefer to modify the formula, if possible.
Any help will be greatly appreciated.
Jack



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 44
Default Indirect function problem

Thanks!!!!!!!
That worked !!! I was hoping for a simple solution and that was it!
Jack

"T. Valko" wrote in message
...
Try it like this:

=INDIRECT("'"&A1&"'!A7")

--
Biff
Microsoft Excel MVP


"jack" wrote in message
...
I have an inherited a workbook with numerous sheets (tabs) named in the
format of last name,first initial (for example: Jones,R -- there's no
space
between the last name and first initial, just the comma). I have a brief
macro that lists these worksheet names in column A.
I am attempting to collect several columns summary data from all the
worksheets by using the formula =INDIRECT(A1&"!$A$7") (as an example) and
copying it down column B. The result is #REF! . It appears that the
comma
in the worksheet names is causing the #REF! error message. I don't
understand why this is occurring. Is there a way I can correct for this
in
the formula without going thru the long process of renaming each of the
numerous worksheet tabs?
Or if there is a way to accomplish this through VBA, let me know if I
should
repost in the Excel Programming newsgroup. I'm not too skilled in VBA and
would prefer to modify the formula, if possible.
Any help will be greatly appreciated.
Jack





  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Indirect function problem

You're welcome. Thanks for the feedack!

--
Biff
Microsoft Excel MVP


"jack" wrote in message
...
Thanks!!!!!!!
That worked !!! I was hoping for a simple solution and that was it!
Jack

"T. Valko" wrote in message
...
Try it like this:

=INDIRECT("'"&A1&"'!A7")

--
Biff
Microsoft Excel MVP


"jack" wrote in message
...
I have an inherited a workbook with numerous sheets (tabs) named in the
format of last name,first initial (for example: Jones,R -- there's no
space
between the last name and first initial, just the comma). I have a brief
macro that lists these worksheet names in column A.
I am attempting to collect several columns summary data from all the
worksheets by using the formula =INDIRECT(A1&"!$A$7") (as an example) and
copying it down column B. The result is #REF! . It appears that the
comma
in the worksheet names is causing the #REF! error message. I don't
understand why this is occurring. Is there a way I can correct for this
in
the formula without going thru the long process of renaming each of the
numerous worksheet tabs?
Or if there is a way to accomplish this through VBA, let me know if I
should
repost in the Excel Programming newsgroup. I'm not too skilled in VBA and
would prefer to modify the formula, if possible.
Any help will be greatly appreciated.
Jack









  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Indirect function problem


You have to put in some apostrophes around the sheet name, too.

=INDIRECT("'"&H3&"'!A2")

jack;247557 Wrote:
I have an inherited a workbook with numerous sheets (tabs) named in the
format of last name,first initial (for example: Jones,R -- there's no
space
between the last name and first initial, just the comma). I have a
brief
macro that lists these worksheet names in column A.
I am attempting to collect several columns summary data from all the
worksheets by using the formula =INDIRECT(A1&"!$A$7") (as an example)
and
copying it down column B. The result is #REF! . It appears that the
comma
in the worksheet names is causing the #REF! error message. I don't
understand why this is occurring. Is there a way I can correct for
this in
the formula without going thru the long process of renaming each of
the
numerous worksheet tabs?
Or if there is a way to accomplish this through VBA, let me know if I
should
repost in the Excel Programming newsgroup. I'm not too skilled in VBA
and
would prefer to modify the formula, if possible.
Any help will be greatly appreciated.
Jack



--
JBeaucaire
------------------------------------------------------------------------
JBeaucaire's Profile: http://www.thecodecage.com/forumz/member.php?userid=73
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=69056

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
Another problem - INDIRECT? Andrew Mackenzie Excel Discussion (Misc queries) 3 December 8th 08 03:02 PM
problem with indirect Sam Excel Discussion (Misc queries) 7 November 27th 08 04:01 AM
problem using the INDIRECT function hot dogs Excel Discussion (Misc queries) 2 November 6th 06 10:09 AM
INDIRECT Problem JHarriman Excel Discussion (Misc queries) 1 February 21st 06 03:27 PM
I have a problem fillling series with indirect function milkman Excel Worksheet Functions 4 January 28th 06 10:35 PM


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