#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Conditional Countif

Hello all,

I have two column one with date & Time and other with status of vehicle, I
want to count how many startup during 08:00 to 20:00 and how many startup
20:00 to 08:00.

Thanks & Regards
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 211
Default Conditional Countif

With A1:A23 representing time (Containing no or similar dates):

For 8am - 8pm
=+SUMPRODUCT((A1:A23VALUE("08:00"))*(A1:A23<=VALU E("20:00")))

For 8pm - 8am
=+SUMPRODUCT((A1:A23<=VALUE("08:00"))+(A1:A23VALU E("20:00")))
--
Thanx in advance,
Best Regards,

Faraz


"TFMR" wrote:

Hello all,

I have two column one with date & Time and other with status of vehicle, I
want to count how many startup during 08:00 to 20:00 and how many startup
20:00 to 08:00.

Thanks & Regards

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Conditional Countif

If your data is arranged in this manner;

Column A Column B
Date&Time Status
12/31/2009 7:09 Startup
12/31/2009 7:39 Startup
12/31/2009 8:09
12/31/2009 8:39 Startup
12/31/2009 9:09
12/31/2009 9:39 Startup
12/31/2009 10:09 Startup
12/31/2009 10:39
12/31/2009 11:09 Startup

'between 8am and 8pm
With no blank cells and date/time in the range A2:A10
=SUMPRODUCT((HOUR(A2:A10-TIME(8,0,0))<12)*(B2:B10="Startup"))

'between 8pm and 8am
With no blank cells and date/time in the range A2:A10
=SUMPRODUCT(--(HOUR(A2:A10-TIME(8,0,0))=12)*(B2:B10="Startup"))

--
Jacob


"TFMR" wrote:

Hello all,

I have two column one with date & Time and other with status of vehicle, I
want to count how many startup during 08:00 to 20:00 and how many startup
20:00 to 08:00.

Thanks & Regards

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Conditional Countif

where I have to write "startup"?

"Faraz A. Qureshi" wrote:

With A1:A23 representing time (Containing no or similar dates):

For 8am - 8pm
=+SUMPRODUCT((A1:A23VALUE("08:00"))*(A1:A23<=VALU E("20:00")))

For 8pm - 8am
=+SUMPRODUCT((A1:A23<=VALUE("08:00"))+(A1:A23VALU E("20:00")))
--
Thanx in advance,
Best Regards,

Faraz


"TFMR" wrote:

Hello all,

I have two column one with date & Time and other with status of vehicle, I
want to count how many startup during 08:00 to 20:00 and how many startup
20:00 to 08:00.

Thanks & Regards

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 211
Default Conditional Countif

OK
Now I get the complete/clear picture.
With A1:A23 representing time (Containing no or similar dates) &
B1:B23 representing startup status:

For 8am - 8pm
=+SUMPRODUCT((A1:A23VALUE("08:00"))*(A1:A23<=VALU E("20:00"))*(UPPER(B1:B23)="STARTUP"))

For 8pm - 8am
=+SUMPRODUCT(((A1:A23<=VALUE("08:00"))+(A1:A23VAL UE("20:00")))*(UPPER(B1:B23)="STARTUP"))

--
Thanx in advance,
Best Regards,

Faraz


"TFMR" wrote:

where I have to write "startup"?

"Faraz A. Qureshi" wrote:

With A1:A23 representing time (Containing no or similar dates):

For 8am - 8pm
=+SUMPRODUCT((A1:A23VALUE("08:00"))*(A1:A23<=VALU E("20:00")))

For 8pm - 8am
=+SUMPRODUCT((A1:A23<=VALUE("08:00"))+(A1:A23VALU E("20:00")))
--
Thanx in advance,
Best Regards,

Faraz


"TFMR" wrote:

Hello all,

I have two column one with date & Time and other with status of vehicle, I
want to count how many startup during 08:00 to 20:00 and how many startup
20:00 to 08:00.

Thanks & Regards



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Conditional Countif

You have overlapping intervals:

08:00 to 20:00 (8:00 AM to 8:00 PM)
20:00 to 08:00 (8:00 PM to 8:00 AM)

If the time is 8:00 PM which interval should it be counted with?
If the time is 8:00 AM which interval should it be counted with?

--
Biff
Microsoft Excel MVP


"TFMR" wrote in message
...
Hello all,

I have two column one with date & Time and other with status of vehicle, I
want to count how many startup during 08:00 to 20:00 and how many startup
20:00 to 08:00.

Thanks & Regards



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
Conditional Countif Curtis Excel Worksheet Functions 3 November 13th 09 05:07 PM
Conditional Countif Curtis Excel Worksheet Functions 0 September 24th 09 11:01 PM
conditional COUNTIF Richard Excel Discussion (Misc queries) 7 May 3rd 07 12:06 AM
Conditional Countif force530 Excel Worksheet Functions 7 July 1st 05 10:08 PM
Conditional countif force530 Excel Worksheet Functions 6 July 1st 05 06:09 PM


All times are GMT +1. The time now is 07:32 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"