LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default How to define range of values in a formula?

Use 2 countifs, something like this:
=COUNTIF(A1:A4,"-0.5")-COUNTIF(A1:A4,"=0.5")

Adapt the range (and the separator?) to suit,
maybe for your example posted it'll be:
=COUNTIF(A30:A32;"-0.5")-COUNTIF(A30:A32;"=0.5")
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"yasen" wrote:
A B C D E
674 817 2 0 1
-6.0
-6.0
0.1


I need to count only the cells (in the first column) wich contain values
within a specified range and display the result (if <0.5 in column C, if
between -0.5 and 0.5 in column D and if 0.5 in column E). I used the COUNTIF
function. It works well with the simple range definitions "<-0.5" and "0.5".
How should I define the range between -0.5 and 0.5? I tried this below, but
it seems I am wrong somewhere.
=COUNTIF(A30:A32;"AND(-0.5,<0.5)").

Thank you in advance!

 
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
Apply Name (Define Name, Name Range) Karin Excel Discussion (Misc queries) 2 May 3rd 07 01:06 PM
How do I define a range using values in cells? Matthieu de Wit Excel Worksheet Functions 2 April 26th 06 09:43 PM
Define a range of cells in VBA Noemi Excel Discussion (Misc queries) 2 October 20th 05 04:32 AM
Define a range based on another named range Basil Excel Worksheet Functions 2 February 21st 05 01:47 PM
Define Range with an offset GregR Excel Discussion (Misc queries) 9 December 21st 04 07:22 AM


All times are GMT +1. The time now is 06:38 AM.

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"