Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 186
Default COUNTIF Query

Hi,

I am trying to filter a spreadsheet which lists in one column job type, and
in the other column response time (total duration in hh:mm:ss). I have been
trying to figure out a COUNTIF query which would allow me to obtain the
number of jobs which have a job type of 'F' for 'Fault', and which have a
response time of less than 2 hours.

If anyone can help me with this, that would be greatly appreciated.
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default COUNTIF Query

=SUMPRODUCT(--(A2:A100="F"),--(B2:B100<--"2:00:00"))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Jack" wrote in message
...
Hi,

I am trying to filter a spreadsheet which lists in one column job type,
and
in the other column response time (total duration in hh:mm:ss). I have
been
trying to figure out a COUNTIF query which would allow me to obtain the
number of jobs which have a job type of 'F' for 'Fault', and which have a
response time of less than 2 hours.

If anyone can help me with this, that would be greatly appreciated.
Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default COUNTIF Query

A worksheet formula?

=sumproduct(--(a1:a10="F"),--(b1:b10<time(2,0,0))

Adjust the ranges to match--but you can't use whole columns (except in xl2007).

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html



Jack wrote:

Hi,

I am trying to filter a spreadsheet which lists in one column job type, and
in the other column response time (total duration in hh:mm:ss). I have been
trying to figure out a COUNTIF query which would allow me to obtain the
number of jobs which have a job type of 'F' for 'Fault', and which have a
response time of less than 2 hours.

If anyone can help me with this, that would be greatly appreciated.
Thanks


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default COUNTIF Query

You might also look at a pivot table. You could add a dummy column to mark
all records that have a response time of less than two hours - maybe
categorize all.

The pivot table would summarize at almost any level and combination you want.

data=Pivot Table

Information on Pivot Tables here
Debra Dalgleish
http://www.contextures.com/tiptech.html

If you don't use it for this, and you are not familiar with them, you should
- they are one of the most powerful features of Excel for analyzing data.

--
Regards,
Tom Ogilvy


"Jack" wrote:

Hi,

I am trying to filter a spreadsheet which lists in one column job type, and
in the other column response time (total duration in hh:mm:ss). I have been
trying to figure out a COUNTIF query which would allow me to obtain the
number of jobs which have a job type of 'F' for 'Fault', and which have a
response time of less than 2 hours.

If anyone can help me with this, that would be greatly appreciated.
Thanks

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 186
Default COUNTIF Query

Thank you very much Dave and Bob - much appreciated.

However I continue to get errors when I use both your formulas.

The COUNTIF formula is typed into a 'summary' sheet, with the source data
coming from another sheet in the same workbook.

Any additional help would be appreciated.
Thanks

"Dave Peterson" wrote:

A worksheet formula?

=sumproduct(--(a1:a10="F"),--(b1:b10<time(2,0,0))

Adjust the ranges to match--but you can't use whole columns (except in xl2007).

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html



Jack wrote:

Hi,

I am trying to filter a spreadsheet which lists in one column job type, and
in the other column response time (total duration in hh:mm:ss). I have been
trying to figure out a COUNTIF query which would allow me to obtain the
number of jobs which have a job type of 'F' for 'Fault', and which have a
response time of less than 2 hours.

If anyone can help me with this, that would be greatly appreciated.
Thanks


--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 186
Default COUNTIF Query

Thanks Tom,

The reason why I am using COUNTIF is to show how many records (represented
as a figure - not in a list) have a response time of less than two hours.
E.g. - 5 'Fault' type jobs have a response time of less than 2 hours.

Thanks

"Tom Ogilvy" wrote:

You might also look at a pivot table. You could add a dummy column to mark
all records that have a response time of less than two hours - maybe
categorize all.

The pivot table would summarize at almost any level and combination you want.

data=Pivot Table

Information on Pivot Tables here
Debra Dalgleish
http://www.contextures.com/tiptech.html

If you don't use it for this, and you are not familiar with them, you should
- they are one of the most powerful features of Excel for analyzing data.

--
Regards,
Tom Ogilvy


"Jack" wrote:

Hi,

I am trying to filter a spreadsheet which lists in one column job type, and
in the other column response time (total duration in hh:mm:ss). I have been
trying to figure out a COUNTIF query which would allow me to obtain the
number of jobs which have a job type of 'F' for 'Fault', and which have a
response time of less than 2 hours.

If anyone can help me with this, that would be greatly appreciated.
Thanks

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default COUNTIF Query

If that is the only thing you want to know, then you are correct that a pivot
table would not be appropriate. If you are going to get that statistic and
then get other statistics, then . . .

--
Regards,
Tom Ogilvy


"Jack" wrote:

Thanks Tom,

The reason why I am using COUNTIF is to show how many records (represented
as a figure - not in a list) have a response time of less than two hours.
E.g. - 5 'Fault' type jobs have a response time of less than 2 hours.

Thanks

"Tom Ogilvy" wrote:

You might also look at a pivot table. You could add a dummy column to mark
all records that have a response time of less than two hours - maybe
categorize all.

The pivot table would summarize at almost any level and combination you want.

data=Pivot Table

Information on Pivot Tables here
Debra Dalgleish
http://www.contextures.com/tiptech.html

If you don't use it for this, and you are not familiar with them, you should
- they are one of the most powerful features of Excel for analyzing data.

--
Regards,
Tom Ogilvy


"Jack" wrote:

Hi,

I am trying to filter a spreadsheet which lists in one column job type, and
in the other column response time (total duration in hh:mm:ss). I have been
trying to figure out a COUNTIF query which would allow me to obtain the
number of jobs which have a job type of 'F' for 'Fault', and which have a
response time of less than 2 hours.

If anyone can help me with this, that would be greatly appreciated.
Thanks

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default COUNTIF Query

Post the formula you used.

I did have a typo in my suggestion--it was missing the final ")". But excel
corrected that when I hit enter.

Jack wrote:

Thank you very much Dave and Bob - much appreciated.

However I continue to get errors when I use both your formulas.

The COUNTIF formula is typed into a 'summary' sheet, with the source data
coming from another sheet in the same workbook.

Any additional help would be appreciated.
Thanks

"Dave Peterson" wrote:

A worksheet formula?

=sumproduct(--(a1:a10="F"),--(b1:b10<time(2,0,0))

Adjust the ranges to match--but you can't use whole columns (except in xl2007).

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html



Jack wrote:

Hi,

I am trying to filter a spreadsheet which lists in one column job type, and
in the other column response time (total duration in hh:mm:ss). I have been
trying to figure out a COUNTIF query which would allow me to obtain the
number of jobs which have a job type of 'F' for 'Fault', and which have a
response time of less than 2 hours.

If anyone can help me with this, that would be greatly appreciated.
Thanks


--

Dave Peterson


--

Dave Peterson
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default COUNTIF Query

It sounded like he may not know

=sumproduct(--(Sheet1!a1:a10="F"),--(Sheet1!b1:b10<time(2,0,0)))


if the data is on a sheet with a tab name/Sheet Name of Sheet1 and the
formula is on another sheet.


if the sheet name has a space in it, then it would be

=sumproduct(--('My Data'!a1:a10="F"),--('My Data'!b1:b10<time(2,0,0)))

as an example.



--
Regards,
Tom Ogilvy



"Dave Peterson" wrote:

Post the formula you used.

I did have a typo in my suggestion--it was missing the final ")". But excel
corrected that when I hit enter.

Jack wrote:

Thank you very much Dave and Bob - much appreciated.

However I continue to get errors when I use both your formulas.

The COUNTIF formula is typed into a 'summary' sheet, with the source data
coming from another sheet in the same workbook.

Any additional help would be appreciated.
Thanks

"Dave Peterson" wrote:

A worksheet formula?

=sumproduct(--(a1:a10="F"),--(b1:b10<time(2,0,0))

Adjust the ranges to match--but you can't use whole columns (except in xl2007).

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html



Jack wrote:

Hi,

I am trying to filter a spreadsheet which lists in one column job type, and
in the other column response time (total duration in hh:mm:ss). I have been
trying to figure out a COUNTIF query which would allow me to obtain the
number of jobs which have a job type of 'F' for 'Fault', and which have a
response time of less than 2 hours.

If anyone can help me with this, that would be greatly appreciated.
Thanks

--

Dave Peterson


--

Dave Peterson

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
Countif query Keith[_3_] Excel Worksheet Functions 2 February 16th 10 01:43 AM
Mutliple Function Query - probably using Countif Damo Excel Worksheet Functions 2 May 13th 09 06:40 PM
COUNTIF function query Wendy-Bob[_2_] Excel Worksheet Functions 6 January 21st 09 03:05 PM
Countif Query John Moore Excel Discussion (Misc queries) 4 June 25th 07 10:06 PM
CountIf function query Alan M Excel Programming 2 March 27th 06 02:52 PM


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