Thread: Embed an array?
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Tyro[_2_] Tyro[_2_] is offline
external usenet poster
 
Posts: 1,091
Default Embed an array?

I used the following formula. The range A1:A5 is named Jan_G. The range
B1:C5 is named Jan_Inc. The range D1:E5 is named Jan_Exp. This formula
produces the correct answer:

=SUMPRODUCT(--(Jan_G="G")*(Jan_inc-Jan_Exp))

It does not need to be entered as an array formula.

Tyro


If I name A1:A5 as Jan_G this array formula works fine for me:
=SUMPRODUCT(--(Jan_G="G")*((Jan_inc)-(Jan_Exp)))
"JanetH" wrote in message
...

=SUMPRODUCT(--((Jan_G)="G")*((Jan_Inc)-(Jan_Exp)))

I tried the above - Jan_G is the "Name" of the range with the "G"'s, i.e.
Column A - but it returns an "NA". Thoughts?
--
JanetH


"Tyro" wrote:

I should have clarified. The formula assumes your array is in rows 1
through
5. Adjust A1:A5 as necessary

Tyro

"Tyro" wrote in message
et...
Enter this array formula:

Try =SUMPRODUCT(--(A1:A5="G")*((Jan_inc)-(Jan_Exp)))


Tyro

"JanetH" wrote in message
...
I have the formula: {=SUM((Jan_Inc),(-Jan_Exp))} where Jan_Inc is a 3
column
by X row array representing three types of income numbers, and Jan_Exp
is
the
same for expense numbers. This works fine.

Now I want to SUMIF to include only the rows in the array where there
is
a
"G" in the first column of the spreadsheet (not in the array). Is
there
a
way to do this?

Thanks.
--
JanetH