Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Biff
 
Posts: n/a
Default 3D reference with multiple criteria

Hi Folks!

Working on a response to a post that requires 3D referencing across multiple
sheets. This could be done using an intermediate calculation and then a
simple SUM for the final result. I'm trying to eliminate that intermediate
calc.

Column A = dates
Column B = item
Column C = numeric values

This formula returns #VALUE! but when I step through it using F9 it
evaluates to the proper result:

=SUMPRODUCT(SUM((MONTH(INDIRECT("'"&H1:H2&"'!a1")) =1)*(INDIRECT("'"&H1:H2&"'!b1")="car")*(INDIRECT(" '"&H1:H2&"'!c1"))))

H1:H2 are the sheet names

Here are the eval steps:

=SUMPRODUCT(SUM((MONTH({38353;38353})=1)*({"car";" car"}="car")*({100;100})))

=SUMPRODUCT(SUM(({TRUE;TRUE})*({TRUE;TRUE})*({100; 100})))

=SUMPRODUCT(SUM({100;100}))

=SUMPRODUCT(200)

200

Why is this formula returning #VALUE! ?

Thanks
Biff



  #2   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

You run up against the so-called dereferencing problem whose solution
requires a second round of evaluation. N() and T() are functions which
are frequently invoked to effect that evaluation:

=SUMPRODUCT(--(MONTH(N(INDIRECT("'"&H1:H2&"'!A1")))=1),--(T(INDIRECT("'"&H1:H2&"'!B1"))="car"),--(N(INDIRECT("'"&H1:H2&"'!C1"))))

BTW, an alternative is to invoke a formula with Longre's THREED...

=SUMPRODUCT(--(MONTH(THREED(Sheet2:Sheet3!A1))=1),--(THREED(Sheet2:Sheet3!B1)="car"),THREED(Sheet2:She et3!C1))


Biff wrote:
Hi Folks!

Working on a response to a post that requires 3D referencing across multiple
sheets. This could be done using an intermediate calculation and then a
simple SUM for the final result. I'm trying to eliminate that intermediate
calc.

Column A = dates
Column B = item
Column C = numeric values

This formula returns #VALUE! but when I step through it using F9 it
evaluates to the proper result:

=SUMPRODUCT(SUM((MONTH(INDIRECT("'"&H1:H2&"'!a1")) =1)*(INDIRECT("'"&H1:H2&"'!b1")="car")*(INDIRECT(" '"&H1:H2&"'!c1"))))

H1:H2 are the sheet names

Here are the eval steps:

=SUMPRODUCT(SUM((MONTH({38353;38353})=1)*({"car";" car"}="car")*({100;100})))

=SUMPRODUCT(SUM(({TRUE;TRUE})*({TRUE;TRUE})*({100; 100})))

=SUMPRODUCT(SUM({100;100}))

=SUMPRODUCT(200)

200

Why is this formula returning #VALUE! ?

Thanks
Biff



  #3   Report Post  
Biff
 
Posts: n/a
Default

Thank you, Aladin!

That worked!

Biff

"Aladin Akyurek" wrote in message
...
You run up against the so-called dereferencing problem whose solution
requires a second round of evaluation. N() and T() are functions which are
frequently invoked to effect that evaluation:

=SUMPRODUCT(--(MONTH(N(INDIRECT("'"&H1:H2&"'!A1")))=1),--(T(INDIRECT("'"&H1:H2&"'!B1"))="car"),--(N(INDIRECT("'"&H1:H2&"'!C1"))))

BTW, an alternative is to invoke a formula with Longre's THREED...

=SUMPRODUCT(--(MONTH(THREED(Sheet2:Sheet3!A1))=1),--(THREED(Sheet2:Sheet3!B1)="car"),THREED(Sheet2:She et3!C1))


Biff wrote:
Hi Folks!

Working on a response to a post that requires 3D referencing across
multiple sheets. This could be done using an intermediate calculation and
then a simple SUM for the final result. I'm trying to eliminate that
intermediate calc.

Column A = dates
Column B = item
Column C = numeric values

This formula returns #VALUE! but when I step through it using F9 it
evaluates to the proper result:

=SUMPRODUCT(SUM((MONTH(INDIRECT("'"&H1:H2&"'!a1")) =1)*(INDIRECT("'"&H1:H2&"'!b1")="car")*(INDIRECT(" '"&H1:H2&"'!c1"))))

H1:H2 are the sheet names

Here are the eval steps:

=SUMPRODUCT(SUM((MONTH({38353;38353})=1)*({"car";" car"}="car")*({100;100})))

=SUMPRODUCT(SUM(({TRUE;TRUE})*({TRUE;TRUE})*({100; 100})))

=SUMPRODUCT(SUM({100;100}))

=SUMPRODUCT(200)

200

Why is this formula returning #VALUE! ?

Thanks
Biff



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
Can I get the mode, min, and max with multiple criteria? BobT Excel Discussion (Misc queries) 1 February 15th 05 03:20 AM
Countif with multiple criteria and multiple worksheets JJ Excel Worksheet Functions 1 December 28th 04 06:37 PM
Counting "rows", i.e. simultaneous criteria for multiple cells gkline Excel Worksheet Functions 2 November 19th 04 07:30 AM
Can I use a cell reference in the criteria for the sumif function. Number Cruncher Excel Worksheet Functions 2 November 4th 04 07:52 PM
How do I reference multiple rows Awetronics Excel Worksheet Functions 1 November 4th 04 12:37 AM


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