Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
rmellison
 
Posts: n/a
Default Problem using ADDRESS() in SUMPRODUCT()

This is a re-post of a problem from last week, hopefully someone can help...

Why does this formula return #VALUE:
=SUMPRODUCT(--(INDIRECT(INDEX($A$9:$A$72,$A$6)&"!B1:CW1")D$1),--(INDIRECT(INDEX($A$9:$A$72,$A$6)&"!B1:CW1")<E$1),I NDIRECT(ADDRESS(ROW(),COLUMN(B2),4,,(INDEX($A$9:$A $72,$A$6)))&":"&(ADDRESS(ROW(),COLUMN(CW2),4))))

When this formula works as expected:
=SUMPRODUCT(--(INDIRECT(INDEX($A$9:$A$72,$A$6)&"!B1:CW1")D$1),--(INDIRECT(INDEX($A$9:$A$72,$A$6)&"!B1:CW1")<E$1),I NDIRECT(INDEX($A$9:$A$72,$A$6)&"!B2:CW2"))

I cannot use the latter formula because I need to drag it down for each of
several thousand rows, and I would need to change "B2:CW2" manually for every
row.


  #2   Report Post  
Posted to microsoft.public.excel.misc
rmellison
 
Posts: n/a
Default Problem using ADDRESS() in SUMPRODUCT()

I should add that #VALUE error is not caused by different array size or not
committing with Ctrl+Shift+Enter.

"rmellison" wrote:

This is a re-post of a problem from last week, hopefully someone can help...

Why does this formula return #VALUE:
=SUMPRODUCT(--(INDIRECT(INDEX($A$9:$A$72,$A$6)&"!B1:CW1")D$1),--(INDIRECT(INDEX($A$9:$A$72,$A$6)&"!B1:CW1")<E$1),I NDIRECT(ADDRESS(ROW(),COLUMN(B2),4,,(INDEX($A$9:$A $72,$A$6)))&":"&(ADDRESS(ROW(),COLUMN(CW2),4))))

When this formula works as expected:
=SUMPRODUCT(--(INDIRECT(INDEX($A$9:$A$72,$A$6)&"!B1:CW1")D$1),--(INDIRECT(INDEX($A$9:$A$72,$A$6)&"!B1:CW1")<E$1),I NDIRECT(INDEX($A$9:$A$72,$A$6)&"!B2:CW2"))

I cannot use the latter formula because I need to drag it down for each of
several thousand rows, and I would need to change "B2:CW2" manually for every
row.


  #3   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Problem using ADDRESS() in SUMPRODUCT()

It is because the new code returns the range in an array, and it doesn't
like it.

Try this instead

=SUMPRODUCT(--(INDIRECT(INDEX($A$9:$A$72,$A$6)&"!B1:M1")D$1),
--(INDIRECT(INDEX($A$9:$A$72,$A$6)&"!B1:M1")<E$1),
INDIRECT(INDEX($A$9:$A$72,$A$6)&"!B"&ROWS($A$1:A2) &":M"&ROWS($A$1:A2)))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"rmellison" wrote in message
...
I should add that #VALUE error is not caused by different array size or

not
committing with Ctrl+Shift+Enter.

"rmellison" wrote:

This is a re-post of a problem from last week, hopefully someone can

help...

Why does this formula return #VALUE:

=SUMPRODUCT(--(INDIRECT(INDEX($A$9:$A$72,$A$6)&"!B1:CW1")D$1),--(INDIRECT(I
NDEX($A$9:$A$72,$A$6)&"!B1:CW1")<E$1),INDIRECT(ADD RESS(ROW(),COLUMN(B2),4,,(
INDEX($A$9:$A$72,$A$6)))&":"&(ADDRESS(ROW(),COLUMN (CW2),4))))

When this formula works as expected:

=SUMPRODUCT(--(INDIRECT(INDEX($A$9:$A$72,$A$6)&"!B1:CW1")D$1),--(INDIRECT(I
NDEX($A$9:$A$72,$A$6)&"!B1:CW1")<E$1),INDIRECT(IND EX($A$9:$A$72,$A$6)&"!B2:C
W2"))

I cannot use the latter formula because I need to drag it down for each

of
several thousand rows, and I would need to change "B2:CW2" manually for

every
row.




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
MIN Function w/ variable address reference WLMPilot Excel Worksheet Functions 7 June 10th 05 07:56 PM
cell address problem solrac99 Excel Discussion (Misc queries) 4 May 31st 05 09:55 PM
How do I import Office address book to Outlook Express address bo. snnorp Excel Discussion (Misc queries) 2 February 22nd 05 11:47 AM
adding two sumproduct formulas together ski2004_2005 Excel Worksheet Functions 1 November 12th 04 09:08 PM
SUMPRODUCT problem Jane Excel Worksheet Functions 3 November 8th 04 11:58 PM


All times are GMT +1. The time now is 02:31 PM.

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"