Consulting

Results 1 to 4 of 4

Thread: Solved: countif with multiple criteria

  1. #1

    Solved: countif with multiple criteria

    hi all,
    need some help. i used to know how to do this but for some reason i cant remember now.....

    need a formula:
    in col A rows 1 thru 500 have values = can be "a", "b", or "c"
    in col b rows 1 thru 500 have values = can be "x" or "y"

    need formula to do the following:
    count how many rows there are that have "a" in col A, and "x" in col b
    count how many rows there are that have "a" in col A, and "y" in col b
    count how many rows there are that have "b" in col A, and "x" in col b
    etc

    help would b greatly appreciated!!!

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    =SUMPRODUCT(--($A$2:$A$200="a"),--($B$2:$B$200="x"))

    etc.
    ____________________________________________
    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

  3. #3
    hmmmm.....that's now working but i think it's b/c i'm trying to sum a text value - there are no numerical values in the cells, i just want to count how many there are...

    thanks!

  4. #4
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,080
    Location
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

Posting Permissions

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