IF Formulas

  • Thread starter Thread starter numbersgirl
  • Start date Start date
N

numbersgirl

I have a formula that is to reslut in counting the number of incidences if
the line meets the criteria.
1. Jan (Month)
2. Sun (Day of the Month)
3. 11 (Hour of the Day)
4. The fourth criteria column just has a 1 in it to count.
If the line meets all 3 criteria count it otherwise put a zero in the cell.

Sum(IF($B$5:$B$5034="Jan",IF($H$5:$H$5034-"Sun",
IF($J$5:$J$5034=11,$I$5:$I$5034,0),0)))

This formula works for me with the "Jan" and the 11, but when I add the
third criteria "Sun" it gives me a zero.

Hope someone can help.
Thanks
 
In just a quick glance, if you copied your formula and pasted, you have
-"Sun" instead of ="Sun"
 
You are correct. Unfortunately, this is just a typo - the actual formula
uses ="Sun".
Any other observations?
Thanks for the response.
 
Try this normally entered formula:

=SUMPRODUCT(--($B$5:$B$5034="Jan"),--($H$5:$H$5034="Sun"),--($J$5:$J$5034=11))

Better to use cells to hold the criteria:

A1 = Jan
B1 = Sun
C1 = 11

=SUMPRODUCT(--($B$5:$B$5034=A1),--($H$5:$H$5034=B1),--($J$5:$J$5034=C1))
 
What is in columns B, H and J... real Excel dates formatted to look like the
month name, day name and hour or do you actually have text, or formulas
returning text, that show the entries you listed?
 
See Biff's response for a good formula (T. Valko). If that answer doesn't
work for you, Rick posed some questions that would need to be answered.
 

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

Back
Top