Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Rob
 
Posts: n/a
Default Help with Sumproduct with Indirect

Hi
I am currently using the following formula...
=SUMPRODUCT((INDIRECT("$E$1:$AN$1")<"Cat")*INDIRE CT("$E$3:$AN$3"))
I need to add another criterium "Dog". How do I modify?
Thanks
Rob
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

One way:

=SUMPRODUCT(--($E$1:$AN$1<"Cat"),--($E$1:$AN$1<"Dog"),$E$3:$AN$3))

convert ranges to INDIRECTs if necessary.

In article ,
Rob wrote:

I am currently using the following formula...
=SUMPRODUCT((INDIRECT("$E$1:$AN$1")<"Cat")*INDIRE CT("$E$3:$AN$3"))
I need to add another criterium "Dog". How do I modify?

  #3   Report Post  
Arvi Laanemets
 
Posts: n/a
Default

Hi

Why do you use INDIRECT here? Simply
=SUMPRODUCT(($E$1:$AN$1<"Cat")*($E$3:$AN$3))
will work in same way. Even better will be
=SUMPRODUCT(--($E$1:$AN$1<"Cat"),($E$3:$AN$3))

About your question - for which range will the additional criterium apply?
When you want to sum all values in row 3 with "Dog" or "Cat" in row 1, then
=SUMPRODUCT(--($E$1:$AN$1<"Dog"),($E$3:$AN$3))+SUMPRODUCT(--($E$1:$AN$1<"C
at"),($E$3:$AN$3))
When you want to sum all values in row 3 with "Cat" in row 1 and "Dog" in
row 2, then
=SUMPRODUCT(--($E$1:$AN$1<"Cat"),--($E$2:$AN$2<"Dog"),($E$3:$AN$3))


Arvi Laanemets


"Rob" wrote in message
...
Hi
I am currently using the following formula...
=SUMPRODUCT((INDIRECT("$E$1:$AN$1")<"Cat")*INDIRE CT("$E$3:$AN$3"))
I need to add another criterium "Dog". How do I modify?
Thanks
Rob



  #4   Report Post  
JE McGimpsey
 
Posts: n/a
Default

The only advantage I can see to INDIRECT is that it allows one to insert
columns/rows without the formula automatically adjusting.

I probably could come up with a scenario where that made sense.

In article ,
"Arvi Laanemets" wrote:

Why do you use INDIRECT here?

  #5   Report Post  
Rob
 
Posts: n/a
Default

Thanks!

"JE McGimpsey" wrote:

One way:

=SUMPRODUCT(--($E$1:$AN$1<"Cat"),--($E$1:$AN$1<"Dog"),$E$3:$AN$3))

convert ranges to INDIRECTs if necessary.

In article ,
Rob wrote:

I am currently using the following formula...
=SUMPRODUCT((INDIRECT("$E$1:$AN$1")<"Cat")*INDIRE CT("$E$3:$AN$3"))
I need to add another criterium "Dog". How do I modify?




  #6   Report Post  
Arvi Laanemets
 
Posts: n/a
Default

Hi


"JE McGimpsey" wrote in message
...
The only advantage I can see to INDIRECT is that it allows one to insert
columns/rows without the formula automatically adjusting.


Then I would use dynamic named ranges instead.


Arvi Laanemets


  #7   Report Post  
JE McGimpsey
 
Posts: n/a
Default

In article ,
"Arvi Laanemets" wrote:

Then I would use dynamic named ranges instead.


I might, too, but at the same time, it would introduce a layer of
obfuscation that using INDIRECT() doesn't.
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
referencing named formula using INDIRECT function [email protected] Excel Worksheet Functions 19 May 11th 05 09:48 AM
sumproduct & indirect floridasurfn Excel Worksheet Functions 3 March 14th 05 02:01 AM
Indirect range in SUMPRODUCT? BobT Excel Discussion (Misc queries) 2 February 16th 05 08:51 PM
Sumproduct function not working Scott Summerlin Excel Worksheet Functions 12 December 4th 04 05:15 AM
adding two sumproduct formulas together ski2004_2005 Excel Worksheet Functions 1 November 12th 04 09:08 PM


All times are GMT +1. The time now is 01:35 PM.

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"