#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default IF Formulas

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,358
Default IF Formulas

In just a quick glance, if you copied your formula and pasted, you have
-"Sun" instead of ="Sun"
--
** John C **

"numbersgirl" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default IF Formulas

You are correct. Unfortunately, this is just a typo - the actual formula
uses ="Sun".
Any other observations?
Thanks for the response.

"John C" wrote:

In just a quick glance, if you copied your formula and pasted, you have
-"Sun" instead of ="Sun"
--
** John C **

"numbersgirl" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default IF Formulas

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))

--
Biff
Microsoft Excel MVP


"numbersgirl" wrote in message
...
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



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default IF Formulas

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?

--
Rick (MVP - Excel)


"numbersgirl" wrote in message
...
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




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,358
Default IF Formulas

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.
--
** John C **


"numbersgirl" wrote:

You are correct. Unfortunately, this is just a typo - the actual formula
uses ="Sun".
Any other observations?
Thanks for the response.

"John C" wrote:

In just a quick glance, if you copied your formula and pasted, you have
-"Sun" instead of ="Sun"
--
** John C **

"numbersgirl" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CELLS NOT CALC FORMULAS - VALUES STAY SME FORMULAS CORRECT?? HELP Sherberg Excel Worksheet Functions 4 September 11th 07 01:34 AM
lookup formulas dependent upon lookup formulas Skibee Excel Worksheet Functions 1 July 20th 07 01:06 PM
automatically copy formulas down columns or copy formulas all the HowlingBlue Excel Worksheet Functions 1 March 16th 07 11:11 PM
Formulas not evaluated, Formulas treated as strings Bob Sullentrup Excel Discussion (Misc queries) 0 November 27th 06 08:01 PM
formulas for changing formulas? creativeops Excel Discussion (Misc queries) 4 January 26th 06 03:07 AM


All times are GMT +1. The time now is 08:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"