+ Reply to Thread
Results 1 to 29 of 29

Count with two criteria

Hybrid View

  1. #1
    Registered User
    Join Date
    10-05-2009
    Location
    Lofoten, Norway
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: How to count with 2 criterias?

    Come on, can anyone please help me with this? At least tell me if its possible / not possible. It can be others sollutions than counting? Just ways to do it? I'm on a time schedule and some tips would be very very helpful
    Last edited by SpareBank1; 10-06-2009 at 07:42 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: How to count with 2 criterias?

    Based on the below

    Lets say:
    The Results (H, D, or A) is displayed from G2 to G381 (G2:G381)
    The Home odds is displayed from X2 to X381 (X2:X381)

    So if i want to know: How many times did the Home-odds 1.60 win?
    Could you please explain more specific like if I were stupid?

    Like: How many times does 1.60 appear in X2:X381, when "H" is in G2:G381
    Using XL2007

    =COUNTIFS(X2:X381;1.60;G2:G381;"H")
    Last edited by DonkeyOte; 10-06-2009 at 07:50 AM. Reason: removed sample suggestion - working off latter post in thread

  3. #3
    Registered User
    Join Date
    10-05-2009
    Location
    Lofoten, Norway
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: How to count with 2 criterias?

    Thanx alot for your help, but still i can't get it to work
    I'll add the sheet here, and the actual cells are the ones i mentioned X2:X381 and G2:G381, so you can see for yourself I tried your formula but it says the formula contains an error. Tried with both COUNTIFS and COUNTIF (couldn't find COUNTIFS in the formula-list). There is a COUNT, a COUNTA, and a COUNTIF. COUNTA is counting number of blank cells.

    Heres the file:
    http://www.football-data.co.uk/mmz4281/0910/E0.csv

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: How to count with 2 criterias?

    OK your profile says you're using XL2007 - if you can't see COUNTIFS I suspect you're actually running an earlier version.

    Does the below work ?

    =SUMPRODUCT(--(X2:X381=1.60);--(G2:G381="H"))

    Going forward please attach files here directly.

  5. #5
    Registered User
    Join Date
    10-05-2009
    Location
    Lofoten, Norway
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: How to count with 2 criterias?

    Quote Originally Posted by DonkeyOte View Post
    OK your profile says you're using XL2007 - if you can't see COUNTIFS I suspect you're actually running an earlier version.

    Does the below work ?

    =SUMPRODUCT(--(X2:X381=1.60);--(G2:G381="H"))

    Going forward please attach files here directly.
    Oh huge mistake by me there. I have the "Office 2007" package, so i expected it was Excel2007, but when i check it it says Microsoft Excel 2002.
    Sorry about that

    I'll attach the file here:

    http://www.football-data.co.uk/mmz4281/0809/E0.csv
    Odds in: X2:X381 and Results in G2:G381, as in the example above

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to count with 2 criterias?

    I have the "Office 2007" package, so i expected it was Excel2007, but when i check it it says Microsoft Excel 2002
    Be sure to edit your profile to match.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: How to count with 2 criterias?

    The formula provided previously does what you want - you may need to alter the delimiters per your locale settings.
    I had assumed from your profile that you were in Norway and thus would be using ; delimiter - if not adjust my example as necessary.
    (note however in your sample file Col X does not contain any 1.60 values so you will get a 0 output).

+ 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