Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 136
Default Using SUM with INDIRECT function

Hi,

I have the following formula
=SUM(January!BM9,February!BM9,March!BM9,April!BM9, May!BM9,June!BM9,July!BM9,August!BM9,September!BM9 ,October!BM9,November!BM9,December!BM9)
Which works fine but I would like to shorten it.
I have a sheet called Data with a list of the months in range A13:A24 and I
was wondering if I could use the INDIRECT function instead?? If so can you
please provide the correct formula for the above.

Thanks in advance,

Gav
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Using SUM with INDIRECT function

Gav123 wrote:
Hi,

I have the following formula
=SUM(January!BM9,February!BM9,March!BM9,April!BM9, May!BM9,June!BM9,July!BM9,August!BM9,September!BM9 ,October!BM9,November!BM9,December!BM9)
Which works fine but I would like to shorten it.
I have a sheet called Data with a list of the months in range A13:A24 and I
was wondering if I could use the INDIRECT function instead?? If so can you
please provide the correct formula for the above.

Thanks in advance,

Gav



Look at "Refer to the same cell or range on multiple sheets" in the help file.
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,047
Default Using SUM with INDIRECT function

easy way to shorten it

sum(January:December!BM9)

if the first spreadsheet is Jan and the last Dec.

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"Gav123" escreveu:

Hi,

I have the following formula
=SUM(January!BM9,February!BM9,March!BM9,April!BM9, May!BM9,June!BM9,July!BM9,August!BM9,September!BM9 ,October!BM9,November!BM9,December!BM9)
Which works fine but I would like to shorten it.
I have a sheet called Data with a list of the months in range A13:A24 and I
was wondering if I could use the INDIRECT function instead?? If so can you
please provide the correct formula for the above.

Thanks in advance,

Gav

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Using SUM with INDIRECT function

Marcelo's suggestion is the best solution but this is how it can be done
using your list of sheet names:

=SUMPRODUCT(SUMIF(INDIRECT("'"&A13:A24&"'!BM9"),"< 1E100"))


--
Biff
Microsoft Excel MVP


"Gav123" wrote in message
...
Hi,

I have the following formula
=SUM(January!BM9,February!BM9,March!BM9,April!BM9, May!BM9,June!BM9,July!BM9,August!BM9,September!BM9 ,October!BM9,November!BM9,December!BM9)
Which works fine but I would like to shorten it.
I have a sheet called Data with a list of the months in range A13:A24 and
I
was wondering if I could use the INDIRECT function instead?? If so can you
please provide the correct formula for the above.

Thanks in advance,

Gav



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default Using SUM with INDIRECT function

"T. Valko" wrote...
Marcelo's suggestion is the best solution but this is how it can be done
using your list of sheet names:

=SUMPRODUCT(SUMIF(INDIRECT("'"&A13:A24&"'!BM9")," <1E100"))

....

Why SUMIF? Wouldn't

=SUMPRODUCT(N(INDIRECT("'"&A13:A24&"'!BM9")))

suffice?


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Using SUM with INDIRECT function

"Harlan Grove" wrote in message
...
"T. Valko" wrote...
Marcelo's suggestion is the best solution but this is how it can be done
using your list of sheet names:

=SUMPRODUCT(SUMIF(INDIRECT("'"&A13:A24&"'!BM9"), "<1E100"))

...

Why SUMIF? Wouldn't

=SUMPRODUCT(N(INDIRECT("'"&A13:A24&"'!BM9")))

suffice?


It probably would but the SUMIF version is more robust.


--
Biff
Microsoft Excel MVP


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default Using SUM with INDIRECT function

"T. Valko" wrote...
"Harlan Grove" wrote in message
"T. Valko" wrote...

....
=SUMPRODUCT(SUMIF(INDIRECT("'"&A13:A24&"'!BM9") ,"<1E100"))

....
=SUMPRODUCT(N(INDIRECT("'"&A13:A24&"'!BM9")))

....
It probably would but the SUMIF version is more robust.


The SUMIF formula handles multiple cell ranges in each worksheet.
Whether trapping error values is a good thing is arguable. Then again,
the SUMIF formula is slower. It's a trade-off.
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 136
Default Using SUM with INDIRECT function

Thanks Biff, that was exactly what I was looking for.

"T. Valko" wrote:

Marcelo's suggestion is the best solution but this is how it can be done
using your list of sheet names:

=SUMPRODUCT(SUMIF(INDIRECT("'"&A13:A24&"'!BM9"),"< 1E100"))


--
Biff
Microsoft Excel MVP


"Gav123" wrote in message
...
Hi,

I have the following formula
=SUM(January!BM9,February!BM9,March!BM9,April!BM9, May!BM9,June!BM9,July!BM9,August!BM9,September!BM9 ,October!BM9,November!BM9,December!BM9)
Which works fine but I would like to shorten it.
I have a sheet called Data with a list of the months in range A13:A24 and
I
was wondering if I could use the INDIRECT function instead?? If so can you
please provide the correct formula for the above.

Thanks in advance,

Gav




  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Using SUM with INDIRECT function

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Gav123" wrote in message
...
Thanks Biff, that was exactly what I was looking for.

"T. Valko" wrote:

Marcelo's suggestion is the best solution but this is how it can be done
using your list of sheet names:

=SUMPRODUCT(SUMIF(INDIRECT("'"&A13:A24&"'!BM9"),"< 1E100"))


--
Biff
Microsoft Excel MVP


"Gav123" wrote in message
...
Hi,

I have the following formula
=SUM(January!BM9,February!BM9,March!BM9,April!BM9, May!BM9,June!BM9,July!BM9,August!BM9,September!BM9 ,October!BM9,November!BM9,December!BM9)
Which works fine but I would like to shorten it.
I have a sheet called Data with a list of the months in range A13:A24
and
I
was wondering if I could use the INDIRECT function instead?? If so can
you
please provide the correct formula for the above.

Thanks in advance,

Gav






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 function willem Excel Discussion (Misc queries) 6 April 17th 08 01:58 PM
How to use indirect function? Eric Excel Discussion (Misc queries) 6 June 20th 07 10:06 AM
indirect function ah Excel Worksheet Functions 1 January 25th 07 12:22 PM
INDIRECT function inside AND function Biff Excel Worksheet Functions 3 September 23rd 06 07:20 PM
Indirect Function and Sum gr Excel Worksheet Functions 2 February 2nd 05 04:16 PM


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