+ Reply to Thread
Results 1 to 7 of 7

Formula to Count based in conditions

  1. #1
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Formula to Count based in conditions

    Hi... i have a worksheet where in collumn A i have the 4 following variable data:
    One
    Two
    Three
    Four

    Then in collumn B i have this variable data: 0-0, 0-1, 1-0, 1-1, ........
    So, for each variable on A, it may get one from the different variables from B.

    I need a formula to count how many One's, Two's, Three's and Four's i have with 0-0 in collumn B.

    I collumn C1 i thried the follwing formula to count how many 0-0 i have for 0ne's:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    but this only count how many ones exist in A column int that range.
    SUMIF would work if i had a new collumn (for example C) where i transform all 0-0 in value 1 (through IF function) and the ordered the follwing:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    . But i dont want to add another collumn because in my original it would need a lot of work then to fix other things.

    So 'm in need of a formula that combines some approach of SUMIF formula but to count each variable in A that has 0-0 in B. Anyone knows this?
    I'm sure its simple, i'm just not getting there.
    Thank you.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Formula to Count based in conditions

    Use pivot table for that.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula to Count based in conditions

    Maybe something like this...

    =COUNTIFS(A1:A20;"One";B1:B20;"0-0")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Formula to Count based in conditions

    @Tony Valko
    I took a look at COUNTIFS before i started this thread but when i wrote the formula it didn't nade sense so i dodn't tryed it lol now i wrote it down and pressed enter and do what i need perfectly. lol So... one rule: try before you ask. Dont know why but two conditions in hte way this formula is built did'nt make much sense for what i wanted so i didn't try it and thou the approach was by some kindof mix between countif and sumif and it was that simply really. Thanks for the reply. you solved it.

    @oeldere
    Thanks for the reply but i really did not want to got through pivot tables. But thanks anyway.

    Regards.

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Formula to Count based in conditions

    I tought (guessed) you would react that way.

    If you want your data for all options 0-0, 0-1, 1-0, 1-1, ........
    pivot table will do that automatic for you.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula to Count based in conditions

    You're welcome. Thanks for the feedback!

  7. #7
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Formula to Count based in conditions

    @oeldere
    I only need for 0-0. But i'll keep that in mind. Thank you

+ 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