+ Reply to Thread
Results 1 to 11 of 11

Compare two cells and count how many times either one exceeds 500

  1. #1
    Forum Contributor
    Join Date
    08-29-2013
    Location
    CT
    MS-Off Ver
    Excel 2016 Mac
    Posts
    268

    Compare two cells and count how many times either one exceeds 500

    Here is my quandary.

    I have a score sheet. It has two team on it. I would like to automatically count how many times a team exceeds 500 and give that team a win. It also needs to give the team with the higher total a win if they both exceed 500.

    I have attached a sample sheet. The cells i am looking to calculate is the wins and loss column to the right.

    Any help would be greatly appreciated.

    Los
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    08-29-2013
    Location
    CT
    MS-Off Ver
    Excel 2016 Mac
    Posts
    268

    Re: Compare two cells and count how many times either one exceeds 500

    I was trying to use countif but i couldn't figure out how to get my desired results, or even if that was the correct path to go down....


    At a loss

    Los

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,208

    Re: Compare two cells and count how many times either one exceeds 500

    Team 1 Wins

    =COUNTIF($C:$C,">500")

    Team 2 wins

    =COUNTIF($E:$E,">500")

  4. #4
    Forum Contributor
    Join Date
    08-29-2013
    Location
    CT
    MS-Off Ver
    Excel 2016 Mac
    Posts
    268

    Re: Compare two cells and count how many times either one exceeds 500

    will that account for both teams scoring over 500 but yielding only the team with the largest number over 500 the winner?


    Example
    Team 1 515 points
    Team 2 534 Points

    in this scenario they are both over 500 but team two is the winner

    Thanks for the clarification

    Los

  5. #5
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Compare two cells and count how many times either one exceeds 500

    Maybe:

    Team 1 wins/Team 2 loses (I2 & J3):
    =SUMPRODUCT(--($C$3:$C$50>$E$3:$E$50),--($C$3:$C$50>=500))

    Team 2 wins/Team 1 loses (I3 & J2):
    =SUMPRODUCT(--($C$3:$C$50<$E$3:$E$50),--($E$3:$E$50>=500))

    If there are more games, you can increase the size of the range (currently through row 50)

  6. #6
    Forum Contributor
    Join Date
    08-29-2013
    Location
    CT
    MS-Off Ver
    Excel 2016 Mac
    Posts
    268

    Re: Compare two cells and count how many times either one exceeds 500

    So i tried adapting that formula to my sheet and i cannot figure out what is wrong. I have attached my actual sheet and am looking for a way to automatically count wins for each team. A win being a the highest total over 500 points for each game.

    Thanks in advance for all of the help

    Los
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Compare two cells and count how many times either one exceeds 500

    Your "numbers" in columns Q and AH look like numbers, but they're actually text. Tack a "+0" onto the back of your formulas in those columns to massage them into being actual numbers. For example, Q3 should become:

    =IF(A3="","",(LEFT(P3,LEN(P3)-1)&K3)+0)

    Do that for both columns and the Win/Loss totals will be correct. See attached:
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Compare two cells and count how many times either one exceeds 500

    For a better overall table, change the formulas in Q and AH so that they use mathematical operators like "+" and "-" rather than textual operators like "&". You could replace the formula in Q3 with:

    =IF(A3="","",P3+K3)

    ...and end up with a number instead of text that looks like a number.

  9. #9
    Forum Contributor
    Join Date
    08-29-2013
    Location
    CT
    MS-Off Ver
    Excel 2016 Mac
    Posts
    268

    Re: Compare two cells and count how many times either one exceeds 500

    Thank you so much i woulda never figured that out.....

    Los

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,208

    Re: Compare two cells and count how many times either one exceeds 500

    Change the calculations in Q and Ah

    =IF(A3="","",INT(P3/10)*10+K3)

    =IF(R3="","",(INT(AG3/10)*10+AB3))

    Your calculations result in TEXT field and hence the spurious results.

  11. #11
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Compare two cells and count how many times either one exceeds 500

    Glad to help, good luck!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. count how many times we have the same value in two (or more) adjacent cells
    By AlienPump in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-22-2016, 10:48 AM
  2. [SOLVED] Count last 7 days of pupil attendance that exceeds 31
    By wilson23 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-30-2015, 10:11 AM
  3. Replies: 11
    Last Post: 02-18-2015, 10:49 AM
  4. Count how many times a number apears in random cells
    By ian.seethal in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-16-2014, 06:52 AM
  5. Replies: 1
    Last Post: 12-12-2014, 11:51 AM
  6. Count if: Compare 2 ranges and count where cells in same row differ
    By ExcelFed in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-15-2014, 02:34 PM
  7. Counting number of times a maximum exceeds a threshold on a certain frequency
    By varsakov in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-04-2013, 02:21 PM

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