View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
KJ KJ is offline
external usenet poster
 
Posts: 43
Default Count multiple criteria

Thanks for that. Seems to work a treat on my sample. Will have a go on the
real thing tomorrow. Didn't have the TEXT bit or mmm-yy at all - simply went
into range, "Jan-08". Also, hadn't realised I couldn't use full column
references in v2003.

Thank you kindly.


"Pete_UK" wrote:

You can only use SUMIF and COUNTIF when you have only one condition.
For more conditions you need to use SUMPRODUCT (and you can use this
for summing and counting). Try this:

=SUMPRODUCT((TEXT(A1:A100,"mmm-yy")="Jan-08")*(B1:B1000))

Adjust the ranges to suit, but you can't use full-column references
unless you have XL2007.

Hope this helps.

Pete

On Dec 2, 3:44 pm, KJ wrote:
I'm trying to count how many times a combination of 2 criteria occur at the
same time across a range that sits in another worksheet in the same workbook
so I can summarise the amount of sales (not value) by month & year.

I've spent ages looking at the advice on this so far and tried various
suggestions involving the sumproduct, countif and IF functions. I can manage
the countif and sumif when there is just 1 criteria but when I add in the
second one, I get 0 returned each time or with the sum and countif together,
it adds both countifs up.

Here's what I'm trying to do if anyone can help.
Col A contains month and year and is custom formatted as mmm-yy eg Jan-08
Col B contains a numerical value eg £100
Col C - I've set up as a count column so it contains 1 all the way down.

I'd like to know how many occurances of say Jan-08 in Col A also have a
value (any number 1) showing in Col B.

Thanks.