View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Array Formula Question

=SUMPRODUCT(--(J2:J2000=E8),--(K2:K2000=E9),M2:M2000)

That one is getting a conditional sum

For a conditional count:

=SUMPRODUCT(--(J2:J2000=E8),--(K2:K2000=E9))

For the conditional max:

Array entered using the key combination of CTRL,SHIFT,ENTER (not just
ENTER):

=MAX(IF((J2:J2000=E8)*(K2:K2000=E9),M2:M2000))

Biff

"IPerlovsky" wrote in message
...
I am trying to count and max in this array: M2:M2000 based on 2 criterion:
J2:J2000=E8 and K2:K2000=E9. Any ideas?
--
iperlovsky


"Bernard Liengme" wrote:

The syntax of COUNTIF is COUNTIF(range-A, criteria, range-B)
The syntax of SUMPRODUCT is SUMPRODUCT ( array-1, array-2, ...)
You are making arrays so SP works, Countif does not
any help?
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"IPerlovsky" wrote in message
...
I am receiving "the formula you typed contains an error" when I try to
execute the following formulas. Any ideas why these don't work?

=COUNTIF((--(J2:J2000=E8),--(K2:K2000=E9)),M2:M2000)
=MAX(IF((--(J2:J2000=E8),--(K2:K2000=E9)),M2:M2000)))

when this one does...

=SUMPRODUCT(--(J2:J2000=E8),--(K2:K2000=E9),M2:M2000)
--
iperlovsky