A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

COUNTIF



 
 
Thread Tools Display Modes
  #1  
Old April 28th, 2004, 04:48 PM
Dawn
external usenet poster
 
Posts: n/a
Default COUNTIF

I need to set up a formula that will count a value if it meets a particular
criteria within a range.

Count if the number is less than 2
Count if the number is between the range of 3 & 5
Count if the number is between the range of 6 & 8
and so on....

Thanks!


  #2  
Old April 28th, 2004, 05:06 PM
Peo Sjoblom
external usenet poster
 
Posts: n/a
Default COUNTIF

1.

=COUNTIF(Range,"=2")

or

=COUNTIF(Range,"2")

but since the next start with 3 I assume you want to include 2, else use the
second formula

2.

=COUNTIF(Range,"=3")-COUNTIF(Range,"5")

3.

=COUNTIF(Range,"=6")-COUNTIF(Range,"8")

and so on



--

Regards,

Peo Sjoblom


"Dawn" wrote in message
...
I need to set up a formula that will count a value if it meets a

particular
criteria within a range.

Count if the number is less than 2
Count if the number is between the range of 3 & 5
Count if the number is between the range of 6 & 8
and so on....

Thanks!




  #3  
Old May 19th, 2004, 04:50 PM
Frank Kabel
external usenet poster
 
Posts: n/a
Default Countif

Hi
never heard of this. If you like email me your file and I'll have a
look at it
email: frank[dot]kabel[at]freenet[dot]de

--
Regards
Frank Kabel
Frankfurt, Germany


Matt wrote:
I have a very large spreadsheet where I am using Countif to count the
data in the first column. It works perfectly for the first 10,750
rows and then returns the wrong count for the remaing rows. Example:
12 when the correct count should be 9. I have 575 rows remaining. If
I cut and paste, say 20 rows into another spreadsheet the count is
correct on the new spreadsheet. If I paste all 575 rows into a new
spreadsheet the count is wrong. The spreadsheet is set up as follows.

Column A Column B
NLM =COUNTIF(A:A,A1) result is 3
NLM =COUNTIF(A:A,A2) result is 3
NLM =COUNTIF(A:A,A3) result is 3
WLK =COUNTIF(A:A,A4) result is 2
WLK =COUNTIF(A:A,A5) result is 2

The count is used for a summary on another worksheet in the same
workbook.

Does any of this make sense?


  #4  
Old May 19th, 2004, 04:52 PM
Peo Sjoblom
external usenet poster
 
Posts: n/a
Default Countif

Use the advanced filter to extract a unique list from A
(datafilteradvanced filter, copy to another location,
unique records only), then use that list to refer to your count,

assume that you copy the unique list into D21, use

=COUNTIF(A:A,D2)

copy down along the filtered list.
Why do you count the same value over and over?

--

Regards,

Peo Sjoblom


"Matt" wrote in message
...
I have a very large spreadsheet where I am using Countif to count the data

in the first column. It works perfectly for the first 10,750 rows and then
returns the wrong count for the remaing rows. Example: 12 when the correct
count should be 9. I have 575 rows remaining. If I cut and paste, say 20
rows into another spreadsheet the count is correct on the new spreadsheet.
If I paste all 575 rows into a new spreadsheet the count is wrong. The
spreadsheet is set up as follows.

Column A Column B
NLM =COUNTIF(A:A,A1) result is 3
NLM =COUNTIF(A:A,A2) result is 3
NLM =COUNTIF(A:A,A3) result is 3
WLK =COUNTIF(A:A,A4) result is 2
WLK =COUNTIF(A:A,A5) result is 2

The count is used for a summary on another worksheet in the same workbook.

Does any of this make sense?






  #5  
Old May 19th, 2004, 04:58 PM
Peo Sjoblom
external usenet poster
 
Posts: n/a
Default Countif

Should of course be D2, not D21

--

Regards,

Peo Sjoblom


"Peo Sjoblom" wrote in message
...
Use the advanced filter to extract a unique list from A
(datafilteradvanced filter, copy to another location,
unique records only), then use that list to refer to your count,

assume that you copy the unique list into D21, use

=COUNTIF(A:A,D2)

copy down along the filtered list.
Why do you count the same value over and over?

--

Regards,

Peo Sjoblom


"Matt" wrote in message
...
I have a very large spreadsheet where I am using Countif to count the

data
in the first column. It works perfectly for the first 10,750 rows and then
returns the wrong count for the remaing rows. Example: 12 when the correct
count should be 9. I have 575 rows remaining. If I cut and paste, say 20
rows into another spreadsheet the count is correct on the new spreadsheet.
If I paste all 575 rows into a new spreadsheet the count is wrong. The
spreadsheet is set up as follows.

Column A Column B
NLM =COUNTIF(A:A,A1) result is 3
NLM =COUNTIF(A:A,A2) result is 3
NLM =COUNTIF(A:A,A3) result is 3
WLK =COUNTIF(A:A,A4) result is 2
WLK =COUNTIF(A:A,A5) result is 2

The count is used for a summary on another worksheet in the same

workbook.

Does any of this make sense?








  #6  
Old May 19th, 2004, 05:26 PM
Matt
external usenet poster
 
Posts: n/a
Default Countif

I am counting the same value over and over for the summary sheet. I am using Vlookup on the summary sheet to look up the count on my data sheet. Because of the amount of data and the formatting (this was data downloaded from SAP) it seemed to be the easiest way to obtain the count. Is there another way to do this?
  #7  
Old May 19th, 2004, 05:43 PM
Frank Kabel
external usenet poster
 
Posts: n/a
Default Countif

Hi
yes do just that :-)

--
Regards
Frank Kabel
Frankfurt, Germany


Matt wrote:
Frank, the file is approximately 26mb. I can send you a copy of the
problem area if thats ok.

  #8  
Old May 19th, 2004, 09:19 PM
Harlan Grove
external usenet poster
 
Posts: n/a
Default Countif

"=?Utf-8?B?TWF0dA==?=" wrote...
I have a very large spreadsheet where I am using Countif to count the data in
the first column. It works perfectly for the first 10,750 rows and then
returns the wrong count for the remaing rows. Example: 12 when the correct
count should be 9. I have 575 rows remaining. If I cut and paste, say 20 rows
into another spreadsheet the count is correct on the new spreadsheet. If I
paste all 575 rows into a new spreadsheet the count is wrong. The spreadsheet
is set up as follows.

Column A Column B
NLM =COUNTIF(A:A,A1) result is 3
NLM =COUNTIF(A:A,A2) result is 3
NLM =COUNTIF(A:A,A3) result is 3
WLK =COUNTIF(A:A,A4) result is 2
WLK =COUNTIF(A:A,A5) result is 2

The count is used for a summary on another worksheet in the same workbook.


If your counts were understated, I'd suspect variable trailing space characters.
However, your count is overstated, so do any of your column A entries contain
either ? or * characters?

--
To top-post is human, to bottom-post and snip is sublime.
  #9  
Old May 19th, 2004, 09:29 PM
Frank Kabel
external usenet poster
 
Posts: n/a
Default Countif

Hi
as a follow-up:
Nothing was wrong with the formulas. Just some additional matching
values at the end of the range (which seemed to be sorted but wasn't)


--
Regards
Frank Kabel
Frankfurt, Germany


Frank Kabel wrote:
Hi
yes do just that :-)


Matt wrote:
Frank, the file is approximately 26mb. I can send you a copy of the
problem area if thats ok.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:40 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.