bluegirl_1962
New Member
- Joined
- Jun 7, 2011
- Messages
- 10
I have several variables I need to count in one row. Can this be done? I used the Countif function but am only counting row variable.
Was able to figure it out... Thanks! used a sum(countif.range.criteria1), (countif.range.criteria2) etc statement
Try this...I have several variables I need to count in one row. Can this be done? I used the Countif function but am only counting row variable.
Book1 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | |||
1 | brown | orange | yellow | black | orange | black | green | blue | ||
2 | _ | _ | _ | _ | _ | _ | _ | _ | ||
3 | Criteria | Count | _ | _ | _ | _ | _ | _ | ||
4 | yellow | 4 | _ | _ | _ | _ | _ | _ | ||
5 | green | _ | _ | _ | _ | _ | _ | _ | ||
6 | orange | _ | _ | _ | _ | _ | _ | _ | ||
Sheet1 |
Maybe a bit easier on you...
=SUM(COUNTIF(DataRange,{"A","B"}))
=SUMPRODUCT(DataRange,CriteriaRange)
where CriteriaRange is a range, say, X2:X3, housing A and B.