View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Arvi Laanemets Arvi Laanemets is offline
external usenet poster
 
Posts: 510
Default Dynamic name reference in SUMPRODUCT

Hi

INDIRECT converts string range description to range. But maybe you start
from start - what do you want to do at all? I have a feeling there will be
some better solution.

Btw, having account range described in A2, you have always to check the
number of rows in ranges Amount and Period, and compare it with number of
rows you'll get from range described in A2 - SUMPRODUCT will work only, when
it is same (all ranges involved must be of same dimension).

And your original formula must be
=SUMPRODUCT((ACCOUNT<0)*(Period="2006-08")*(AMOUNT))
, or
=SUMPRODUCT((ACCOUNT<"")*(Period="2006-08")*(AMOUNT))

And I myself prefer other syntax, like
=SUMPRODUCT(--(ACCOUNT<""),--(Period="2006-08"),AMOUNT)


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )



"MIKWIN" wrote in message
...
Formula:
SUMPRODUCT((ACCOUNT)*(AMOUNT)*(Period="2006-08"))
works fine... it sums the amounts where period equak 2006-08

but

Forumla:
SUMPRODUCT(($A$2)*(AMOUNT)*(Period="2006-08"))
doesn't work...

$A$2="ACCOUNT"

ACCOUNT=(A2:A65535)

Data table
Account Amount Period
7830 23400 2006-08
3220 -99900 2006-12
3440 -7100 2006-08
3560 2700 2006-08
8540 7900 2006-12

Is there anyone that could help, plse

Best Regards