I have two columns (column A has colors and column B has sizes).
I need to count all the cells in column B that are a size "medium" and if the colour is "red" in column A.
What is a simple formula to calculate that.
Thank you
I have two columns (column A has colors and column B has sizes).
I need to count all the cells in column B that are a size "medium" and if the colour is "red" in column A.
What is a simple formula to calculate that.
Thank you
If you are using 2003 (as your profile says), try this....
=sumproduct((B2:B10="medium")*(A2:A10="red"))
If you have 2007 or later...
=countifs(B2:B10,"medium",A2:A10,"red")
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
You could use something like this
=sumproduct((Col A = "red")*(Col B = "medium"))
Replace Col A and Col B with the actual data ranges involved
Both ranges should be same height
-----------------------
Any good? Wave it, whack the little star at the bottom left of my responses
simply use countifs function as below
count ifs ( criteria range1 , criteria 1, criteria range2 , criteria 2)
pls note pls freeze criteria range
as select the range and press f4 key....
else the result would be effected if you drag ur formula down
many thanks
Rishi Saw
simply use countifs function as below
count ifs ( criteria range1 , criteria 1, criteria range2 , criteria 2)
pls note pls freeze criteria range
as select the range and press f4 key....
else the result would be effected if you drag ur formula down
many thanks
Rishi Saw
OP's version is Excel 2003 - COUNTIFS don't exist
so in that case we only sumproduct is only one way to solve the problem....
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks