Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Count if formula error

A B C D E F
1 Name Classification In Out Hours
2 DELL, BRYAN Pipe Fitter 06:10 18:11 12.01
3 WRITE, ALLAN Pipe Fitter 06:01 16:47 10.77
4 DAVIES, ALAN Quality Control 05:39 13:42 8.05
5 COLLINS, TAY Rigger Advanced 06:03 18:14 12.11
6 PORT, RICHARD Rigger Advanced 05:47 16:50 11.05

In the above example, I can use the formula =COUNTIF(E2:E6,"<=18*:*00")
to count the total number of staff clocking out after 6pm. But when I try
to use the formulas below to count the number of 'Pipe Fitters' clocking out
after 6pm it won't work - what am I doing wrong?

=COUNTIF((B2:B6="Pipe Fitter")*(E2:E6,"<=18*:*00"))
=COUNT(IF((B2:B7="Pipe Fitter")*(E2:E7,"<=18*:*00")))
=SUMPRODUCT((B2:B6="Pipe Fitter")*(E2:E6,"<=18*:*00"))
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default Count if formula error

=SUMPRODUCT(--(B2:B6="Pipe Fitter),--(E2:E60=--"18:00"))

will count after and 18:00 included


=SUMPRODUCT(--(B2:B6="Pipe Fitter),--(E2:E60<--"18:00"))

will count earlier than 18:00

--


Regards,


Peo Sjoblom

"Kate83" wrote in message
...
A B C D E F
1 Name Classification In Out Hours
2 DELL, BRYAN Pipe Fitter 06:10 18:11 12.01
3 WRITE, ALLAN Pipe Fitter 06:01 16:47 10.77
4 DAVIES, ALAN Quality Control 05:39 13:42 8.05
5 COLLINS, TAY Rigger Advanced 06:03 18:14 12.11
6 PORT, RICHARD Rigger Advanced 05:47 16:50 11.05

In the above example, I can use the formula =COUNTIF(E2:E6,"<=18*:*00")
to count the total number of staff clocking out after 6pm. But when I try
to use the formulas below to count the number of 'Pipe Fitters' clocking
out
after 6pm it won't work - what am I doing wrong?

=COUNTIF((B2:B6="Pipe Fitter")*(E2:E6,"<=18*:*00"))
=COUNT(IF((B2:B7="Pipe Fitter")*(E2:E7,"<=18*:*00")))
=SUMPRODUCT((B2:B6="Pipe Fitter")*(E2:E6,"<=18*:*00"))



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Count if formula error

Is it possible to clockout after midnight?

Try this:

=SUMPRODUCT(--(B2:B6="Pipe Fitter"),--(HOUR(E2:E6)=18))

--
Biff
Microsoft Excel MVP


"Kate83" wrote in message
...
A B C D E F
1 Name Classification In Out Hours
2 DELL, BRYAN Pipe Fitter 06:10 18:11 12.01
3 WRITE, ALLAN Pipe Fitter 06:01 16:47 10.77
4 DAVIES, ALAN Quality Control 05:39 13:42 8.05
5 COLLINS, TAY Rigger Advanced 06:03 18:14 12.11
6 PORT, RICHARD Rigger Advanced 05:47 16:50 11.05

In the above example, I can use the formula =COUNTIF(E2:E6,"<=18*:*00")
to count the total number of staff clocking out after 6pm. But when I try
to use the formulas below to count the number of 'Pipe Fitters' clocking
out
after 6pm it won't work - what am I doing wrong?

=COUNTIF((B2:B6="Pipe Fitter")*(E2:E6,"<=18*:*00"))
=COUNT(IF((B2:B7="Pipe Fitter")*(E2:E7,"<=18*:*00")))
=SUMPRODUCT((B2:B6="Pipe Fitter")*(E2:E6,"<=18*:*00"))



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Count if formula error

Thank you - you have made my day :)

"T. Valko" wrote:

Is it possible to clockout after midnight?

Try this:

=SUMPRODUCT(--(B2:B6="Pipe Fitter"),--(HOUR(E2:E6)=18))

--
Biff
Microsoft Excel MVP


"Kate83" wrote in message
...
A B C D E F
1 Name Classification In Out Hours
2 DELL, BRYAN Pipe Fitter 06:10 18:11 12.01
3 WRITE, ALLAN Pipe Fitter 06:01 16:47 10.77
4 DAVIES, ALAN Quality Control 05:39 13:42 8.05
5 COLLINS, TAY Rigger Advanced 06:03 18:14 12.11
6 PORT, RICHARD Rigger Advanced 05:47 16:50 11.05

In the above example, I can use the formula =COUNTIF(E2:E6,"<=18*:*00")
to count the total number of staff clocking out after 6pm. But when I try
to use the formulas below to count the number of 'Pipe Fitters' clocking
out
after 6pm it won't work - what am I doing wrong?

=COUNTIF((B2:B6="Pipe Fitter")*(E2:E6,"<=18*:*00"))
=COUNT(IF((B2:B7="Pipe Fitter")*(E2:E7,"<=18*:*00")))
=SUMPRODUCT((B2:B6="Pipe Fitter")*(E2:E6,"<=18*:*00"))




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Count if formula error

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Kate83" wrote in message
...
Thank you - you have made my day :)

"T. Valko" wrote:

Is it possible to clockout after midnight?

Try this:

=SUMPRODUCT(--(B2:B6="Pipe Fitter"),--(HOUR(E2:E6)=18))

--
Biff
Microsoft Excel MVP


"Kate83" wrote in message
...
A B C D E F
1 Name Classification In Out Hours
2 DELL, BRYAN Pipe Fitter 06:10 18:11 12.01
3 WRITE, ALLAN Pipe Fitter 06:01 16:47 10.77
4 DAVIES, ALAN Quality Control 05:39 13:42 8.05
5 COLLINS, TAY Rigger Advanced 06:03 18:14 12.11
6 PORT, RICHARD Rigger Advanced 05:47 16:50 11.05

In the above example, I can use the formula =COUNTIF(E2:E6,"<=18*:*00")
to count the total number of staff clocking out after 6pm. But when I
try
to use the formulas below to count the number of 'Pipe Fitters'
clocking
out
after 6pm it won't work - what am I doing wrong?

=COUNTIF((B2:B6="Pipe Fitter")*(E2:E6,"<=18*:*00"))
=COUNT(IF((B2:B7="Pipe Fitter")*(E2:E7,"<=18*:*00")))
=SUMPRODUCT((B2:B6="Pipe Fitter")*(E2:E6,"<=18*:*00"))








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default Count if formula error

Hi,

Since 18 hours is 18/24 parts of a day, which in turn is 0.75 you can
simplify your formula to

=SUMPRODUCT(--(B2:B6="Pipe Fitter"),--(E2:E6=18/24))
or
=SUMPRODUCT(--(B2:B6="Pipe Fitter"),--(E2:E6=.75))
and if you enter Pipe Fitters in D1
=SUMPRODUCT(--(B2:B6=D1),--(E2:E6=.75))

Cheers,
Shane Devenshire


"Kate83" wrote:

A B C D E F
1 Name Classification In Out Hours
2 DELL, BRYAN Pipe Fitter 06:10 18:11 12.01
3 WRITE, ALLAN Pipe Fitter 06:01 16:47 10.77
4 DAVIES, ALAN Quality Control 05:39 13:42 8.05
5 COLLINS, TAY Rigger Advanced 06:03 18:14 12.11
6 PORT, RICHARD Rigger Advanced 05:47 16:50 11.05

In the above example, I can use the formula =COUNTIF(E2:E6,"<=18*:*00")
to count the total number of staff clocking out after 6pm. But when I try
to use the formulas below to count the number of 'Pipe Fitters' clocking out
after 6pm it won't work - what am I doing wrong?

=COUNTIF((B2:B6="Pipe Fitter")*(E2:E6,"<=18*:*00"))
=COUNT(IF((B2:B7="Pipe Fitter")*(E2:E7,"<=18*:*00")))
=SUMPRODUCT((B2:B6="Pipe Fitter")*(E2:E6,"<=18*:*00"))

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
Count Formula - Count Ticks LittleAnn Excel Discussion (Misc queries) 3 May 8th 23 07:44 PM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Worksheet Functions 1 May 3rd 08 02:35 PM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Discussion (Misc queries) 1 May 3rd 08 10:52 AM
COUNT with Multiple Criteria Error Teri Excel Worksheet Functions 5 November 29th 05 05:39 PM
Count error frequency in huge column PJohnson Excel Worksheet Functions 2 July 28th 05 08:40 PM


All times are GMT +1. The time now is 11:10 PM.

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

About Us

"It's about Microsoft Excel"