#1   Report Post  
Posted to microsoft.public.excel.misc
cestbarb
 
Posts: n/a
Default COUNTIF

I'll try to make this simple -
I have a large spreadsheet and I need to calculate how many occurrences of a
statement, however I want to exclude from the count if a column contains an
alpha character.
Example - a spreadsheet contains numbers in the first column (which I want
to count) and also alphanumeric (which I want to exclude). How do I make up
the formula. To further complicate matters I'm doing the calculations on
another worksheet. So far I have COUNTIF'myworksheet'!$A2-$A500 -- here I
want to say count if it contains only a number --
Is this clear?
Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre
 
Posts: n/a
Default COUNTIF

It seems like the COUNT function would do what you want. It only counts
numeric cells.

Example:
=COUNT('myworksheet'!$A2:$A500)
that will only count the numeric cells in $A2:$A500 on myworksheet

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"cestbarb" wrote:

I'll try to make this simple -
I have a large spreadsheet and I need to calculate how many occurrences of a
statement, however I want to exclude from the count if a column contains an
alpha character.
Example - a spreadsheet contains numbers in the first column (which I want
to count) and also alphanumeric (which I want to exclude). How do I make up
the formula. To further complicate matters I'm doing the calculations on
another worksheet. So far I have COUNTIF'myworksheet'!$A2-$A500 -- here I
want to say count if it contains only a number --
Is this clear?
Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default COUNTIF

Hi

Try this:
=SUMPRODUCT(--(ISNUMBER(A2:A500)))

Andy.

"cestbarb" wrote in message
...
I'll try to make this simple -
I have a large spreadsheet and I need to calculate how many occurrences of
a
statement, however I want to exclude from the count if a column contains
an
alpha character.
Example - a spreadsheet contains numbers in the first column (which I want
to count) and also alphanumeric (which I want to exclude). How do I make
up
the formula. To further complicate matters I'm doing the calculations on
another worksheet. So far I have COUNTIF'myworksheet'!$A2-$A500 -- here I
want to say count if it contains only a number --
Is this clear?
Thanks.



  #4   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default COUNTIF

I missed your worksheet ref:
=SUMPRODUCT(--(ISNUMBER(myworksheet!A2:A500)))


<Andy wrote in message ...
Hi

Try this:
=SUMPRODUCT(--(ISNUMBER(A2:A500)))

Andy.

"cestbarb" wrote in message
...
I'll try to make this simple -
I have a large spreadsheet and I need to calculate how many occurrences
of a
statement, however I want to exclude from the count if a column contains
an
alpha character.
Example - a spreadsheet contains numbers in the first column (which I
want
to count) and also alphanumeric (which I want to exclude). How do I make
up
the formula. To further complicate matters I'm doing the calculations on
another worksheet. So far I have COUNTIF'myworksheet'!$A2-$A500 -- here
I
want to say count if it contains only a number --
Is this clear?
Thanks.





  #5   Report Post  
Posted to microsoft.public.excel.misc
cestbarb
 
Posts: n/a
Default COUNTIF

Thanks, but I did leave a small part out - what I'm trying to do is count log
assignments. In "A" I have a log number (which can be alphanumeric) in
column "J" I have a name (of the person to whom it was assigned) I need to
count the number of logs that were assigned to each of 10 people so I guess I
have to use COUNTIF.
Barb

"Ron Coderre" wrote:

It seems like the COUNT function would do what you want. It only counts
numeric cells.

Example:
=COUNT('myworksheet'!$A2:$A500)
that will only count the numeric cells in $A2:$A500 on myworksheet

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"cestbarb" wrote:

I'll try to make this simple -
I have a large spreadsheet and I need to calculate how many occurrences of a
statement, however I want to exclude from the count if a column contains an
alpha character.
Example - a spreadsheet contains numbers in the first column (which I want
to count) and also alphanumeric (which I want to exclude). How do I make up
the formula. To further complicate matters I'm doing the calculations on
another worksheet. So far I have COUNTIF'myworksheet'!$A2-$A500 -- here I
want to say count if it contains only a number --
Is this clear?
Thanks.



  #6   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre
 
Posts: n/a
Default COUNTIF

Just for the record....that wasn't exactly a "small part" that was left out :\

Perhaps something like this would work:

For an employee name in A1
B1:=SUMPRODUCT(('myworksheet'!$J$2:$J$500=A1)*('my worksheet'!$A$2:$A$500<""))

OR an easier option might be to set up a Pivot Table. It could
automatically create a table listing each employee on myworksheet and their
corresponding count of log assignments.

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"cestbarb" wrote:

Thanks, but I did leave a small part out - what I'm trying to do is count log
assignments. In "A" I have a log number (which can be alphanumeric) in
column "J" I have a name (of the person to whom it was assigned) I need to
count the number of logs that were assigned to each of 10 people so I guess I
have to use COUNTIF.
Barb

"Ron Coderre" wrote:

It seems like the COUNT function would do what you want. It only counts
numeric cells.

Example:
=COUNT('myworksheet'!$A2:$A500)
that will only count the numeric cells in $A2:$A500 on myworksheet

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"cestbarb" wrote:

I'll try to make this simple -
I have a large spreadsheet and I need to calculate how many occurrences of a
statement, however I want to exclude from the count if a column contains an
alpha character.
Example - a spreadsheet contains numbers in the first column (which I want
to count) and also alphanumeric (which I want to exclude). How do I make up
the formula. To further complicate matters I'm doing the calculations on
another worksheet. So far I have COUNTIF'myworksheet'!$A2-$A500 -- here I
want to say count if it contains only a number --
Is this clear?
Thanks.

  #7   Report Post  
Posted to microsoft.public.excel.misc
cestbarb
 
Posts: n/a
Default COUNTIF

SO confusing, Thanks Andy, but the formula brought out a dialogue box Update
values "my worksheet" Is that what should happen?
Also did you see the second part of my query where I have to segregate by
name as well? Sorry for being so dumb.
Barb

"Andy" wrote:

I missed your worksheet ref:
=SUMPRODUCT(--(ISNUMBER(myworksheet!A2:A500)))


<Andy wrote in message ...
Hi

Try this:
=SUMPRODUCT(--(ISNUMBER(A2:A500)))

Andy.

"cestbarb" wrote in message
...
I'll try to make this simple -
I have a large spreadsheet and I need to calculate how many occurrences
of a
statement, however I want to exclude from the count if a column contains
an
alpha character.
Example - a spreadsheet contains numbers in the first column (which I
want
to count) and also alphanumeric (which I want to exclude). How do I make
up
the formula. To further complicate matters I'm doing the calculations on
another worksheet. So far I have COUNTIF'myworksheet'!$A2-$A500 -- here
I
want to say count if it contains only a number --
Is this clear?
Thanks.






  #8   Report Post  
Posted to microsoft.public.excel.misc
cestbarb
 
Posts: n/a
Default COUNTIF

Oh gosh! - one more thing
Does it matter if the log numbers are separated by a dash as in 06-0033?
I'm guessing it makes a difference.
Barb

"Andy" wrote:

I missed your worksheet ref:
=SUMPRODUCT(--(ISNUMBER(myworksheet!A2:A500)))


<Andy wrote in message ...
Hi

Try this:
=SUMPRODUCT(--(ISNUMBER(A2:A500)))

Andy.

"cestbarb" wrote in message
...
I'll try to make this simple -
I have a large spreadsheet and I need to calculate how many occurrences
of a
statement, however I want to exclude from the count if a column contains
an
alpha character.
Example - a spreadsheet contains numbers in the first column (which I
want
to count) and also alphanumeric (which I want to exclude). How do I make
up
the formula. To further complicate matters I'm doing the calculations on
another worksheet. So far I have COUNTIF'myworksheet'!$A2-$A500 -- here
I
want to say count if it contains only a number --
Is this clear?
Thanks.






  #9   Report Post  
Posted to microsoft.public.excel.misc
cestbarb
 
Posts: n/a
Default COUNTIF

Thank you Andy and Ron.
I'll try and see if it works.

"cestbarb" wrote:

SO confusing, Thanks Andy, but the formula brought out a dialogue box Update
values "my worksheet" Is that what should happen?
Also did you see the second part of my query where I have to segregate by
name as well? Sorry for being so dumb.
Barb

"Andy" wrote:

I missed your worksheet ref:
=SUMPRODUCT(--(ISNUMBER(myworksheet!A2:A500)))


<Andy wrote in message ...
Hi

Try this:
=SUMPRODUCT(--(ISNUMBER(A2:A500)))

Andy.

"cestbarb" wrote in message
...
I'll try to make this simple -
I have a large spreadsheet and I need to calculate how many occurrences
of a
statement, however I want to exclude from the count if a column contains
an
alpha character.
Example - a spreadsheet contains numbers in the first column (which I
want
to count) and also alphanumeric (which I want to exclude). How do I make
up
the formula. To further complicate matters I'm doing the calculations on
another worksheet. So far I have COUNTIF'myworksheet'!$A2-$A500 -- here
I
want to say count if it contains only a number --
Is this clear?
Thanks.





  #10   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default COUNTIF

Hi

When SUMPRODUCT returns results, it defaults to TRUEs and FALSEs. The double
minus coerces the results to be 1s and 0s. A good explanation can be read
he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

Read the FORMAT OF SUMPRODUCT section about halfway through.

Andy.

"Nuraq" wrote in message
...
Andy,

What is the purpose of the "--" before the ISNUMBER?

<Andy wrote in message ...
I missed your worksheet ref:
=SUMPRODUCT(--(ISNUMBER(myworksheet!A2:A500)))


<Andy wrote in message ...
Hi

Try this:
=SUMPRODUCT(--(ISNUMBER(A2:A500)))

Andy.

"cestbarb" wrote in message
...
I'll try to make this simple -
I have a large spreadsheet and I need to calculate how many occurrences
of a
statement, however I want to exclude from the count if a column
contains an
alpha character.
Example - a spreadsheet contains numbers in the first column (which I
want
to count) and also alphanumeric (which I want to exclude). How do I
make up
the formula. To further complicate matters I'm doing the calculations
on
another worksheet. So far I have COUNTIF'myworksheet'!$A2-$A500 --
here I
want to say count if it contains only a number --
Is this clear?
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
Countif Formula /Sort Bug??? orcfodder Excel Discussion (Misc queries) 2 January 12th 06 10:04 AM
Countif, then multiply?? Gee-off Excel Worksheet Functions 4 December 7th 05 08:55 PM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM
Combining IF and COUNTIF based on two columns maxtrixx Excel Discussion (Misc queries) 5 March 31st 05 06:21 PM
Countif - Countif maswinney Excel Worksheet Functions 3 November 15th 04 11:06 PM


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