Consulting

Results 1 to 2 of 2

Thread: Solved: CountIF based on logical operators

  1. #1
    VBAX Regular
    Joined
    May 2008
    Posts
    48
    Location

    Solved: CountIF based on logical operators

    How to Countif based on 2 logical comparisions < or > ?

    Example: I need to count all the cells in the column M2:M30 with the value of 19-29.

    Current Formula only counts any cells that are less then 10

    =COUNTIF($M$2:$M$30,"<=10")

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    =COUNTIF($M$2:$M$30,">=20")-COUNTIF($M$2:$M$30,">=30")

    this counts 20-29, which you may wish to tweak.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •