Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Indirect a range that spans multiple sheets

I'm having a problem with indirect.

I'd like to get
=SUM('Section A:Section B'!A1)

As I step through my formula I get to here, and then get #Ref!
=SUM(INDIRECT("'Section A:Section B'!A1"))

Is there any way to do this?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Indirect a range that spans multiple sheets

Why are you trying to use INDIRECT?

--
Biff
Microsoft Excel MVP


"jhgravelle" wrote in message
...
I'm having a problem with indirect.

I'd like to get
=SUM('Section A:Section B'!A1)

As I step through my formula I get to here, and then get #Ref!
=SUM(INDIRECT("'Section A:Section B'!A1"))

Is there any way to do this?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Indirect a range that spans multiple sheets

because the full formula will use concatenate or &'s no construct 'Section
A:Section B'!A1. I know that part is working, either buy using the formula
auditor, or editing and selecting portions of the formula and pressing F9.
what's not working is the inderect portion.

"T. Valko" wrote:

Why are you trying to use INDIRECT?

--
Biff
Microsoft Excel MVP


"jhgravelle" wrote in message
...
I'm having a problem with indirect.

I'd like to get
=SUM('Section A:Section B'!A1)

As I step through my formula I get to here, and then get #Ref!
=SUM(INDIRECT("'Section A:Section B'!A1"))

Is there any way to do this?




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Indirect a range that spans multiple sheets

Well, if you are building up a string of "'Section A:Section B'!A1",
you may as well go the whole hog and make it:

"SUM('Section A:Section B'!A1)"

Let's say that this is in D5. Then you can make use of this user-
defined function:

Function Eval(Rng As Range) As Variant
Application.Volatile True
Eval = Evaluate(Rng.Text)
End Function

by means of this formula:

=Eval(D5)

in cell E5 (say).

Hope this helps.

Pete


On Nov 12, 11:51 pm, jhgravelle
wrote:
because the full formula will use concatenate or &'s no construct 'Section
A:Section B'!A1. I know that part is working, either buy using the formula
auditor, or editing and selecting portions of the formula and pressing F9.
what's not working is the inderect portion.



"T. Valko" wrote:
Why are you trying to use INDIRECT?


--
Biff
Microsoft Excel MVP


"jhgravelle" wrote in message
...
I'm having a problem with indirect.


I'd like to get
=SUM('Section A:Section B'!A1)


As I step through my formula I get to here, and then get #Ref!
=SUM(INDIRECT("'Section A:Section B'!A1"))


Is there any way to do this?- Hide quoted text -


- Show quoted text -



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Indirect a range that spans multiple sheets

Thanks for the other ways to do it. I wouldn't have come up with such short
vba code, but i could do it through various ways in VBA. I was looking for
using simple excel formula like one would think they could be used. But it
appears that INDIRECT cant always convert a string to a reference.

"Pete_UK" wrote:

Well, if you are building up a string of "'Section A:Section B'!A1",
you may as well go the whole hog and make it:

"SUM('Section A:Section B'!A1)"

Let's say that this is in D5. Then you can make use of this user-
defined function:

Function Eval(Rng As Range) As Variant
Application.Volatile True
Eval = Evaluate(Rng.Text)
End Function

by means of this formula:

=Eval(D5)

in cell E5 (say).

Hope this helps.

Pete


On Nov 12, 11:51 pm, jhgravelle
wrote:
because the full formula will use concatenate or &'s no construct 'Section
A:Section B'!A1. I know that part is working, either buy using the formula
auditor, or editing and selecting portions of the formula and pressing F9.
what's not working is the inderect portion.



"T. Valko" wrote:
Why are you trying to use INDIRECT?


--
Biff
Microsoft Excel MVP


"jhgravelle" wrote in message
...
I'm having a problem with indirect.


I'd like to get
=SUM('Section A:Section B'!A1)


As I step through my formula I get to here, and then get #Ref!
=SUM(INDIRECT("'Section A:Section B'!A1"))


Is there any way to do this?- Hide quoted text -


- Show quoted text -






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Indirect a range that spans multiple sheets

I don't think INDIRECT works very well with 3-d references. The Eval
UDF is very useful for converting strings into formulae - certainly
worth adding to your library of routines.

Pete

On Nov 13, 2:36 pm, jhgravelle
wrote:
Thanks for the other ways to do it. I wouldn't have come up with such short
vba code, but i could do it through various ways in VBA. I was looking for
using simple excel formula like one would think they could be used. But it
appears that INDIRECT cant always convert a string to a reference.



"Pete_UK" wrote:
Well, if you are building up a string of "'Section A:Section B'!A1",
you may as well go the whole hog and make it:


"SUM('Section A:Section B'!A1)"


Let's say that this is in D5. Then you can make use of this user-
defined function:


Function Eval(Rng As Range) As Variant
Application.Volatile True
Eval = Evaluate(Rng.Text)
End Function


by means of this formula:


=Eval(D5)


in cell E5 (say).


Hope this helps.


Pete


On Nov 12, 11:51 pm, jhgravelle
wrote:
because the full formula will use concatenate or &'s no construct 'Section
A:Section B'!A1. I know that part is working, either buy using the formula
auditor, or editing and selecting portions of the formula and pressing F9.
what's not working is the inderect portion.


"T. Valko" wrote:
Why are you trying to use INDIRECT?


--
Biff
Microsoft Excel MVP


"jhgravelle" wrote in message
...
I'm having a problem with indirect.


I'd like to get
=SUM('Section A:Section B'!A1)


As I step through my formula I get to here, and then get #Ref!
=SUM(INDIRECT("'Section A:Section B'!A1"))


Is there any way to do this?- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Indirect a range that spans multiple sheets

INDIRECT is limited with regards of converting a text string spanning more
than one sheet, it needs all the sheet names not just the first and last,
one possible way would be to use

=SUM(N(INDIRECT("'Section "&{"A";"B"}&"'!A1")))


and if the Section is part of all sheet names you can put the other part of
the names within those
curly brackets


--


Regards,


Peo Sjoblom




"jhgravelle" wrote in message
...
Thanks for the other ways to do it. I wouldn't have come up with such
short
vba code, but i could do it through various ways in VBA. I was looking
for
using simple excel formula like one would think they could be used. But
it
appears that INDIRECT cant always convert a string to a reference.

"Pete_UK" wrote:

Well, if you are building up a string of "'Section A:Section B'!A1",
you may as well go the whole hog and make it:

"SUM('Section A:Section B'!A1)"

Let's say that this is in D5. Then you can make use of this user-
defined function:

Function Eval(Rng As Range) As Variant
Application.Volatile True
Eval = Evaluate(Rng.Text)
End Function

by means of this formula:

=Eval(D5)

in cell E5 (say).

Hope this helps.

Pete


On Nov 12, 11:51 pm, jhgravelle
wrote:
because the full formula will use concatenate or &'s no construct
'Section
A:Section B'!A1. I know that part is working, either buy using the
formula
auditor, or editing and selecting portions of the formula and pressing
F9.
what's not working is the inderect portion.



"T. Valko" wrote:
Why are you trying to use INDIRECT?

--
Biff
Microsoft Excel MVP

"jhgravelle" wrote in message
...
I'm having a problem with indirect.

I'd like to get
=SUM('Section A:Section B'!A1)

As I step through my formula I get to here, and then get #Ref!
=SUM(INDIRECT("'Section A:Section B'!A1"))

Is there any way to do this?- 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
Indirect - Multiple Sheets/Cells Keep It Simple Stupid Excel Worksheet Functions 5 November 8th 07 04:39 PM
Individual record spans multiple rows Dana Excel Worksheet Functions 8 May 24th 07 06:04 PM
INDIRECT for range of sheets mr tom Excel Worksheet Functions 6 April 23rd 07 09:13 PM
INDIRECT and multiple sheets smaruzzi Excel Worksheet Functions 1 April 20th 07 10:18 PM
Sum Indirect function through multiple sheets Andre Croteau Excel Discussion (Misc queries) 2 May 6th 05 10:44 AM


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