+ Reply to Thread
Results 1 to 3 of 3

If, or & and functions

  1. #1
    Registered User
    Join Date
    06-13-2018
    Location
    Newcastle, England
    MS-Off Ver
    2016
    Posts
    25

    If, or & and functions

    Hello I hope I have the right place

    I am trying to make a world cup score predictor to make it do the following:

    correct results - 15 points (predicted 3-0 or 1-1, and the actual result is 3-0 or 1-1)
    winning score only - 10 points (predicted 3-2, and the actual result is 3-0)
    win or draw, no correct result - 5 points (predicted 1-0 or 1-1, and the actual result is 3-0 or 2-2)
    any other result - 0 Points

    I have gotten most of it to work so far using the formulae:
    =IF(OR((A1>B1)-(C1>D1),(A1<B1)-(C1<D1)),0,IF(AND(A1=C1,B1=D1),15,5))

    but struggling to integrate the winning score only option to earn 10 points

    Any suggestions would be appreciated

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,077

    Re: If, or & and functions

    Try this (youll need to test this with a lot of results)

    =IF(AND(A1=C1,B1=D1),15,IF(AND(C1<>D1,OR(AND(A1=C1,B1<>D1),AND(B1=D1,A1<>C1))),10,IF(OR(AND(A1>B1,C1>D1,A1<>C1),AND(B1>A1,D1>C1,B1<>D1),AND(A1=B1,C1=D1,A1<>C1)),5,0)))

    I have a feeling this could be shortened as subsequent IFs may be already be implied by the failure of previous IFs, ie we may be checking for things we dont need to as a previous If would have been true but all I've done is simply check against your examples.
    Last edited by Special-K; 06-13-2018 at 08:35 AM.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    06-13-2018
    Location
    Newcastle, England
    MS-Off Ver
    2016
    Posts
    25

    Re: If, or & and functions

    Thankyou very much that works perfectly.

+ 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. Replies: 9
    Last Post: 06-13-2017, 01:41 PM
  2. Replies: 6
    Last Post: 03-17-2015, 01:35 AM
  3. Replies: 1
    Last Post: 02-25-2013, 04:25 PM
  4. Replies: 1
    Last Post: 02-10-2012, 05:27 PM
  5. Replies: 0
    Last Post: 11-15-2007, 05:24 AM
  6. Replies: 2
    Last Post: 07-13-2006, 11:30 PM
  7. Replies: 0
    Last Post: 06-05-2006, 05:20 AM

Tags for this Thread

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