Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
SJC SJC is offline
external usenet poster
 
Posts: 22
Default COUNTIF multiple criteria

I am having trouble with a formula that will count if two criteria are true,
so that I want it to count if the cell is between 100 and 500. Right now,
here is the formula I am using, but it does not work.

=COUNTIF(F309,"100")-COUNTIF(F309,"<500")

Any help would be greatly appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,358
Default COUNTIF multiple criteria

Well, to correct your formula, change the <500 to 499 (assuming you want to
exclude the 100 and 500).
So:
=COUNTIF(F309,"100")-COUNTIF(F309,"499")
or....if it is just for a single cell, you could do the following:
=(F309100)*(F309<500) .... or =AND((F309100),(F309<500))
or....you could put it in an IF statement
=IF(AND(F309100,F309<500),1,0)

Hope this helps.
--
** John C **
Please remember if your question is answered, to mark it answered :). It
helps everyone.


"SJC" wrote:

I am having trouble with a formula that will count if two criteria are true,
so that I want it to count if the cell is between 100 and 500. Right now,
here is the formula I am using, but it does not work.

=COUNTIF(F309,"100")-COUNTIF(F309,"<500")

Any help would be greatly appreciated.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
SJC SJC is offline
external usenet poster
 
Posts: 22
Default COUNTIF multiple criteria

Thanks so much for sharing your expertise--the if statement did the trick.

"John C" wrote:

Well, to correct your formula, change the <500 to 499 (assuming you want to
exclude the 100 and 500).
So:
=COUNTIF(F309,"100")-COUNTIF(F309,"499")
or....if it is just for a single cell, you could do the following:
=(F309100)*(F309<500) .... or =AND((F309100),(F309<500))
or....you could put it in an IF statement
=IF(AND(F309100,F309<500),1,0)

Hope this helps.
--
** John C **
Please remember if your question is answered, to mark it answered :). It
helps everyone.


"SJC" wrote:

I am having trouble with a formula that will count if two criteria are true,
so that I want it to count if the cell is between 100 and 500. Right now,
here is the formula I am using, but it does not work.

=COUNTIF(F309,"100")-COUNTIF(F309,"<500")

Any help would be greatly appreciated.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default COUNTIF multiple criteria

Try it like this:

=--AND(F309100,F309<500)

count if the cell is between 100 and 500


99 times out of 100 when someone says that what they really mean is greater
than or equal to 100 and less than or equal to 500. So, just in case:

=--AND(F309=100,F309<=500)

--
Biff
Microsoft Excel MVP


"SJC" wrote in message
...
I am having trouble with a formula that will count if two criteria are
true,
so that I want it to count if the cell is between 100 and 500. Right now,
here is the formula I am using, but it does not work.

=COUNTIF(F309,"100")-COUNTIF(F309,"<500")

Any help would be greatly appreciated.



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
Nesting COUNTIF for multiple criteria in multiple columns NeedExcelHelp07 Excel Worksheet Functions 1 December 12th 07 05:47 PM
Countif Multiple Criteria jackie Excel Worksheet Functions 3 June 14th 07 04:47 PM
countif multiple criteria Iamwhoiam Excel Worksheet Functions 1 June 27th 06 08:26 PM
Countif w/ Multiple Criteria Patrick_KC Excel Worksheet Functions 2 August 9th 05 09:25 PM
Countif with multiple criteria and multiple worksheets JJ Excel Worksheet Functions 1 December 28th 04 06:37 PM


All times are GMT +1. The time now is 03:20 PM.

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

About Us

"It's about Microsoft Excel"