Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
tb tb is offline
external usenet poster
 
Posts: 12
Default Formula For Counting Records

Column A of my worksheet has a bunch of part numbers. Columns B and C have
formulas that show quantities based on data coming from other worksheets via
a link.
What I would like to do, is put a formula in cell D1 that counts all the
records based on the following criteria:

If the cell in Col. A is not blank, and if the quantities in both Cell B and
C are equal to zero, then count that record.

So, I created the following formula (which obviously does not work...):
=countif(a:a,and(a<"",and(b="0",c="0")))

I am looking for a dynamic formula that will work no matter how many records
are in Cols A,B,C.

Thanks.
--
tb


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Formula For Counting Records

On Oct 30, 12:42*am, "tb" wrote:
Column A of my worksheet has a bunch of part numbers. *Columns B and C have
formulas that show quantities based on data coming from other worksheets via
a link.
What I would like to do, is put a formula in cell D1 that counts all the
records based on the following criteria:

If the cell in Col. A is not blank, and if the quantities in both Cell B and
C are equal to zero, then count that record.

So, I created the following formula (which obviously does not work...):
=countif(a:a,and(a<"",and(b="0",c="0")))

I am looking for a dynamic formula that will work no matter how many records
are in Cols A,B,C.

Thanks.
--
tb


What version of Excel do you have? For Excel 2007 only you can use a
COUNTIFS formula which can reference whole columns, i.e.

=COUNTIFS(A:A,"<",B:B,0,C:C,0)

For earlier versions of Excel you can use SUMPRODUCT something like
this (you can't reference whole columns)

=SUMPRODUCT((A1:A1000<"")*(B1:B1000=0)*(C1:C1000= 0)*(B1:B1000<"")*
(C1:C1000<""))

Note the additional checks to verify that columns B and C are not
blank....because this version will count true blanks as zeroes.....

Increase the range as far as you want, blank cells won't
interfere......or if you really want to restrict the formula to the
used ranges then have a look at dynamic names

regards, barry
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
tb tb is offline
external usenet poster
 
Posts: 12
Default Formula For Counting Records

That works, thanks!
--
tb

"barry houdini" wrote in message
...
On Oct 30, 12:42 am, "tb" wrote:
Column A of my worksheet has a bunch of part numbers. Columns B and C have
formulas that show quantities based on data coming from other worksheets
via
a link.
What I would like to do, is put a formula in cell D1 that counts all the
records based on the following criteria:

If the cell in Col. A is not blank, and if the quantities in both Cell B
and
C are equal to zero, then count that record.

So, I created the following formula (which obviously does not work...):
=countif(a:a,and(a<"",and(b="0",c="0")))

I am looking for a dynamic formula that will work no matter how many
records
are in Cols A,B,C.

Thanks.
--
tb


What version of Excel do you have? For Excel 2007 only you can use a
COUNTIFS formula which can reference whole columns, i.e.

=COUNTIFS(A:A,"<",B:B,0,C:C,0)

For earlier versions of Excel you can use SUMPRODUCT something like
this (you can't reference whole columns)

=SUMPRODUCT((A1:A1000<"")*(B1:B1000=0)*(C1:C1000= 0)*(B1:B1000<"")*
(C1:C1000<""))

Note the additional checks to verify that columns B and C are not
blank....because this version will count true blanks as zeroes.....

Increase the range as far as you want, blank cells won't
interfere......or if you really want to restrict the formula to the
used ranges then have a look at dynamic names

regards, barry


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Formula For Counting Records

=SUMPRODUCT((A1:A100<"")*(B1:B100=0)*(C1:C100=0))


"tb" wrote:

Column A of my worksheet has a bunch of part numbers. Columns B and C have
formulas that show quantities based on data coming from other worksheets via
a link.
What I would like to do, is put a formula in cell D1 that counts all the
records based on the following criteria:

If the cell in Col. A is not blank, and if the quantities in both Cell B and
C are equal to zero, then count that record.

So, I created the following formula (which obviously does not work...):
=countif(a:a,and(a<"",and(b="0",c="0")))

I am looking for a dynamic formula that will work no matter how many records
are in Cols A,B,C.

Thanks.
--
tb


.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
tb tb is offline
external usenet poster
 
Posts: 12
Default Formula For Counting Records

Thanks for the formula help!
--
tb

"Teethless mama" wrote in message
...
=SUMPRODUCT((A1:A100<"")*(B1:B100=0)*(C1:C100=0))


"tb" wrote:

Column A of my worksheet has a bunch of part numbers. Columns B and C
have
formulas that show quantities based on data coming from other worksheets
via
a link.
What I would like to do, is put a formula in cell D1 that counts all the
records based on the following criteria:

If the cell in Col. A is not blank, and if the quantities in both Cell B
and
C are equal to zero, then count that record.

So, I created the following formula (which obviously does not work...):
=countif(a:a,and(a<"",and(b="0",c="0")))

I am looking for a dynamic formula that will work no matter how many
records
are in Cols A,B,C.

Thanks.
--
tb


.





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Formula For Counting Records

XL-2007:

=COUNTIFS(A:A,"<",B:B,,C:C,)


"tb" wrote:

Column A of my worksheet has a bunch of part numbers. Columns B and C have
formulas that show quantities based on data coming from other worksheets via
a link.
What I would like to do, is put a formula in cell D1 that counts all the
records based on the following criteria:

If the cell in Col. A is not blank, and if the quantities in both Cell B and
C are equal to zero, then count that record.

So, I created the following formula (which obviously does not work...):
=countif(a:a,and(a<"",and(b="0",c="0")))

I am looking for a dynamic formula that will work no matter how many records
are in Cols A,B,C.

Thanks.
--
tb


.

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
Counting Records Between Two Dates Stevo Excel Worksheet Functions 7 July 29th 08 03:03 PM
Counting records f(x) two columns jkl Excel Discussion (Misc queries) 6 May 8th 07 05:39 PM
counting records [email protected] Excel Worksheet Functions 8 September 14th 06 09:38 PM
Counting unique records yhtak Excel Worksheet Functions 6 June 16th 06 02:34 PM
Counting records within a month JoAnn New Users to Excel 1 November 22nd 05 06:15 PM


All times are GMT +1. The time now is 04:21 AM.

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"