Help With "CountIf" formula

H

hce

Dear All

Is it possible for me to use the CountIf formula on two criteria...
Currently, I only know how to use the Countif formual based on on
criteria... I have an example below...

Month|Rating
Jan|2
Jan|1
Feb|3
Feb|1
Mar|1
Mar|4
Apr|2
Apr|5

I need to know for example how many "1" are in the rating column but
only want those "1" from Jan... so how can I do this...? I know I ca
do a filter and write the no of records manually but i need to do i
for many records so it would be great if someone can teach me how to d
countif based on 2 criteria either by vba or formula...? I would reall
appreciate your help!!!

cheer
 
H

hce

Dear Arvi

Thank you so much for your prompt reply... I tried your method.. but i
didn't work... did i do something wrong cos the value that was returne
is 0. Could you kindly advice me...?

cheer
 
F

Frank Kabel

Hi
what values do you have in column A. Really text values like 'Jan'. Or
are these dates formated as 'MMM'?
 
H

hce

hi frank

usually i just key them in as Jan-04 or Jan'04... and I think Exce
will treat them as date format automatically... does it make
difference to the formula... if yes can you show me both ways... tex
and date format...?

cheer
 
F

Frank Kabel

Hi
try the following formula then:
=SUMPRODUCT((MONTH(A2:A1000)=1)*(YEAR(A2:A1000)=2004)*(B2:B1000=1))
 
H

hce

Hey Guys

Thanks so much for your help... Both methods worked... I was laz
initially... I just copied and paste and they didn't work... but afte
I typed the formula in... it worked... you guys are geniuses...
really appreciate it..

cheer
 

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