Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default multiple data ranges for countif

"Toppers" wrote...
=COUNTIF(A2:A1000,""&B2)-COUNTIF(A2:A1000,""&C2)

B2=401, B3=501 etc
C2=500, C3=600 etc

....

Classic mistake. Note that the OP's VERY FIRST data point was 500.6.
However, using your intervals above, the formula for the next range using
your formula above would be

=COUNTIF(A2:A1000,""&B3)-COUNTIF(A2:A1000,""&C3)

which would be equivalent to

=COUNTIF(A2:A1000,"501")-COUNTIF(A2:A1000,"600")

So both your original formula and my extension of it to the next interval
would skip the value 500.6. It would have been safer to use just one set of
bounds

B2: 400
B3: 500
B4: 600

and formulas like

=COUNTIF(DATA,""&B2)-COUNTIF(DATA,""&B3)

=COUNTIF(DATA,""&B3)-COUNTIF(DATA,""&B4)

The second of these would include 500.6 in its count. I really doubt the OP
would have wanted to exclude data points for which 0 < MOD(x,100) < 1.


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 for multiple ranges and criteria MML Excel Discussion (Misc queries) 7 May 25th 07 09:54 PM
Using Multiple, Noncontiguous Ranges in COUNTIF? PBJ Excel Discussion (Misc queries) 0 October 11th 06 05:45 PM
COUNTIF() With multiple ranges and variables Thansal Excel Discussion (Misc queries) 3 July 12th 06 05:32 PM
COUNTIF with multiple disjoint ranges, same criteria CLR New Users to Excel 0 March 3rd 06 08:00 PM
COUNTIF Statement with Multiple Conditions in Different Ranges KJA Excel Worksheet Functions 2 April 26th 05 05:14 PM


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