countif maybe

C

Chip Smith

i need to do a count based on two differnt criteria and two different
ranges...like a =countif((range,criteria)&(range,criteria)) or something of
that nature
 
B

Bob Phillips

=SUMPRODUCT(--(rng1="criteria1"),--(rng2="criteria2"))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
C

CLR

If you just want the SUM of the two counts, then........

=countif(range,criteria)+countif(range,criteria)

Vaya con Dios,
Chuck, CABGx3
 
T

Toppers

Look at SUMPRODUCT

=SUMPRODUCT(--(A1:A100="Criteria1"),--(D1:D100="criteria2"))

Ranges must be same dimensions (rows/columns).
 
C

Chip Smith

no i need it to meet both criterias in order for it to count them...maybe a
macro would suite better for this?
 
B

Biff

Hi!

=SUMPRODUCT(--(Range1=Criteria1),--(Range2=Criteria2))

Ranges cannot be entire columns ---- A:A (entire rows is ok ---- 1:1)
Ranges must be the exact same size: Range1 = A1:A10 ---- Range2 = H1:H10 or
A1:A10 ---- H11:H20
If the criteria is a text value enclose it in quotes ---- "Green"
If the criteria is a numeric value don't enclose it in quotes ---- 10

Biff
 
C

Chip Smith

now what if one of the arrays is in the format of a date mm/yy or as mmm? hat
wouldn't be considered text, would it??
--
--Chip Smith--
MVP Wannabe :)


Bob Phillips said:
=SUMPRODUCT(--(rng1="criteria1"),--(rng2="criteria2"))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
P

Peo Sjoblom

It depends on if it is text, if you type in January in a cell it is text, if
you type in 01/01/06 in a cell and format it to mmmm which would read as
January it is not text

--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com


Chip Smith said:
now what if one of the arrays is in the format of a date mm/yy or as mmm?
hat
wouldn't be considered text, would it??
 
Top