Array Formula Question

I

IPerlovsky

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)
 
B

Bernard Liengme

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?
 
I

IPerlovsky

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?
 
S

Sandy Mann

Does:

=SUMPRODUCT(MAX((J2:J200=E8)*(K2:K200=E9)*(M2:M200)))

Do what you want?

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
(e-mail address removed) with @tiscali.co.uk
 
T

T. Valko

=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
 
T

Teethless mama

I never heard The syntax of COUNTIF is COUNTIF(range-A, criteria, range-B) ???

The correct syntax for COUNTIF
COUNTIF(range-A,criteria)

The correct syntax for SUMIF
SUMIF(range-A, criteria, range-B)
 
S

snasui

Condition Count

=COUNT(IF(J2:J2000=E8,IF(K2:K2000=E9,M2:M2000)))
=COUNT(IF(J2:J2000=E8,IF(K2:K2000=E9,1)))
=SUM(IF(J2:J2000=E8,IF(K2:K2000=E9,1)))

Ctrl+Shift+Enter

Condition Max

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

Ctrl+Shift+Enter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top