Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Gordon
 
Posts: n/a
Default Function countif with conditions

I have a list of numbers (2000 lines). I need to count the numbers of
the values in different ranges. eg <= $10.00, $10.01 to $100.00,
$100.01 to $500.00, etc.

The formula =COUNTIF(H2:H2001,"<=10") works. It gives me 257.

But for the next range, formula
=COUNTIF(H2:H2001,AND("10","<=100")) doesn't work.

What's the problem? How can I get this to work?


TIA

  #2   Report Post  
aka excel
 
Posts: n/a
Default

Try the formula =COUNTIF(H2:H2001,"=10")-COUNTIF(B2:B5,"100")


"Gordon" wrote:

I have a list of numbers (2000 lines). I need to count the numbers of
the values in different ranges. eg <= $10.00, $10.01 to $100.00,
$100.01 to $500.00, etc.

The formula =COUNTIF(H2:H2001,"<=10") works. It gives me 257.

But for the next range, formula
=COUNTIF(H2:H2001,AND("10","<=100")) doesn't work.

What's the problem? How can I get this to work?


TIA


  #3   Report Post  
David Billigmeier
 
Posts: n/a
Default

=SUMPRODUCT((H2:H200110)*(H2:H2001<=100))

--
Regards,
Dave
<!--


"Gordon" wrote:

I have a list of numbers (2000 lines). I need to count the numbers of
the values in different ranges. eg <= $10.00, $10.01 to $100.00,
$100.01 to $500.00, etc.

The formula =COUNTIF(H2:H2001,"<=10") works. It gives me 257.

But for the next range, formula
=COUNTIF(H2:H2001,AND("10","<=100")) doesn't work.

What's the problem? How can I get this to work?


TIA


  #4   Report Post  
kk
 
Posts: n/a
Default

Hi Gordon,

You can try...

=SUMPRODUCT(--(H2:H200110),--(H2:H2001<=100))




"Gordon" wrote in message
oups.com...
I have a list of numbers (2000 lines). I need to count the numbers of
the values in different ranges. eg <= $10.00, $10.01 to $100.00,
$100.01 to $500.00, etc.

The formula =COUNTIF(H2:H2001,"<=10") works. It gives me 257.

But for the next range, formula
=COUNTIF(H2:H2001,AND("10","<=100")) doesn't work.

What's the problem? How can I get this to work?


TIA


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
Use IF function for two conditions wuwu Excel Worksheet Functions 3 April 29th 23 11:42 AM
IF Function or Countif Sue Excel Worksheet Functions 3 August 26th 05 01:42 AM
How do you ignore hidden rows in a countif() function Scott buckwalter Excel Worksheet Functions 9 August 11th 05 08:36 PM
COUNTIF and then SUM in Same Function wayne75 Excel Worksheet Functions 1 May 24th 05 11:38 AM
hOW TO USE THE AND OPERATOR WITH THE COUNTIF FUNCTION Marty Excel Worksheet Functions 1 November 11th 04 09:45 PM


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