View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
PCLIVE PCLIVE is offline
external usenet poster
 
Posts: 1,311
Default Count IF multiple criteria

Sarah,

You might try using SUMPRODUCT. However, there are a few things to
consider. SUMPRODUCT doesn't handle the wide card (*) the way you have your
formula written. If you can do without that, then:

=SUMPRODUCT(--('January- STD'!$C$7:$C269="yhard"),--('January-
STD'!$G$7:$G$269<=M1),--('January- STD'!$G$7:$G$269=L1))

Also, your ranges didn't match up. SUMPRODUCT will require matching ranges
as I have done above. This will also work better for you if you select two
cells and have the start and end dates in them. For example, my formula
assums that L1 contains the Start date and M1 contains the End date.

Lastly, you may have intended it to be this way, but I wanted to point out
that your formula was only attempting to calculate through January 30th, and
January has 31 days.

Hope this helps,
Paul

--

"Sarah Barah" <Sarah wrote in message
...
I hope someone can PLEASE help me :)

How do you get a countif to work within a countif's results? I want it to
count how many cells within a range contain certain text and within the
results of that I want it to tell me how many fall within a range of
dates.
This is to be reported on a seperate spreadsheet within the workbook so
filtering isn't an option.

I thought the below formula would work but it actually adds the count of
cells that contain the text "yhard" with the count of cells that fall
within
the date range.

=COUNTIF('January- STD'!$C$7:$C269,"*yhard*")+((COUNTIF('January-
STD'!$G$9:$G$155,"<=01/30/2008")-COUNTIF($G$9:$G$155,"<01/01/2008")))

Is there a way to connect an AND and have the count ifs done in sequential
order by connecting the following 2 formulas?
#1 criteria =COUNTIF('January- STD'!$C$7:$C269,"*yhard*")
# 2 criteria =COUNTIF('January-
STD'!$G$9:$G$155,"<=01/30/2008")-COUNTIF('January-
STD'!$G$9:$G$155,"<01/01/2008")

Thank you thank you thank you in advance if there is a genious out there
that can help me solve my problem! :)