+ Reply to Thread
Results 1 to 6 of 6

Counting with 2 criteria

  1. #1
    Registered User
    Join Date
    10-28-2009
    Location
    dfdgdg
    MS-Off Ver
    Excel 2003
    Posts
    2

    Counting with 2 criteria

    http://img515.imageshack.us/img515/4921/14873395.png

    Check that picture to see what I'm talking about

    I need a formula that will count how many part time staff (PART) that live in the north west (NWest).

    D141 simply uses a COUNTIF statement to count how many PART's there are in column D using the following formula;

    =COUNTIF(D14:D36,"PART")

    I think that cell is fairly useless ether way.

    Please help

    Thanks In advance, Dave

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Counting with 2 critera's, help needed!

    Please Login or Register  to view this content.
    Does that work for you? Alternately, Select cells to put your values into , e.g. H1 and I1 and set up the formula like so
    Please Login or Register  to view this content.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Contributor
    Join Date
    08-14-2008
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    103

    Re: Counting with 2 critera

    ChemistB

    Can you please explain what the "--" infront of the array does?

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Counting with 2 criteria

    The "-" is called the unary operator (or negation operator). The expression (for example) $D$2:$D$200="Part" will give "True", "False" values. A "-" in front of it negates it and forces excel to see it as a number (0 = False, 1 = True). The double unary converts the value back to the original. So basically, the -- changes True to 1 and False to 0. Hopefully that's clear?

  5. #5
    Valued Forum Contributor
    Join Date
    07-21-2008
    Location
    London, UK
    Posts
    326

    Re: Counting with 2 critera

    Quote Originally Posted by HammerTime View Post
    ChemistB

    Can you please explain what the "--" infront of the array does?
    Look at it as if it makes excel count - which is really what you want here

  6. #6
    Registered User
    Join Date
    10-28-2009
    Location
    dfdgdg
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Counting with 2 criteria

    Cheers guys, Works great, just edited the absolute values a bit, and it worked fine

    You helped out a lot, Well done.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1