View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Teethless mama Teethless mama is offline
external usenet poster
 
Posts: 3,718
Default values greater than and including

greater than and including 6 but less than 12

=COUNTIF(A1:A10,"=6")-COUNTIF(A1:A10,"12")


your formula doesn't work. It give you a wrong value

Try it like this:

=COUNTIF(A1:A10,"=6")-COUNTIF(A1:A10,"=12")


"Per Jessen" wrote:

Hi

Both formulas will do it:

=SUMPRODUCT(--(A1:A10=6),--(A1:A10<12))

=COUNTIF(A1:A10,"=6")-COUNTIF(A1:A10,"12")

Regards,
Per


"Teeny" skrev i meddelelsen
...
I need to find how many values in a column are greater than and including 6
but less than 12, I have tried many variations on COUNTIF and the numbers
just dont look right.

Can anyone help?