+ Reply to Thread
Results 1 to 5 of 5

Problem with IF formulae!!!

Hybrid View

tallpaul Problem with IF formulae!!! 10-27-2006, 08:18 AM
Ruthki try something like ... 10-27-2006, 09:32 AM
stevekirk i am assuming that if you do... 10-27-2006, 10:19 AM
tallpaul Worked, sort of!!! 10-27-2006, 12:02 PM
tallpaul Thanks 10-27-2006, 12:00 PM
  1. #1
    Registered User
    Join Date
    04-18-2004
    Posts
    13

    Problem with IF formulae!!!

    Hi, I am trying to formulate an if statement to look at the results from a series of Football results, 20 in total. The Home Team's score is in D2, E2 etc while the away Teams score is in D3, E3, I have the following formula, =+IF(D2>D3,2,+IF(D2=D3,1,0)) which works fine where results are entered, for example 1-0, 0-1 or 0-0 or any combination of win, lose or draw. The problem I have is that cells without results return a score of 1 as it sees 2 unpopulated cells as draw.

    Grateful for any idea's.

    Cheers

    tallpaul

  2. #2
    Forum Contributor
    Join Date
    06-21-2005
    Location
    Cambridge, England
    Posts
    118
    try something like

    =IF(D2>D3,2)+IF(AND(D2=0,D3=0),0,IF(D2=D3,1,0))

    R

  3. #3
    Forum Contributor
    Join Date
    08-10-2006
    Posts
    723
    i am assuming that if you do not put results in the cell will be empty

    if so try this

    =IF(AND(D2="",D3=""),"",IF(D2>D3,2,IF(D2=D3,1,0)))

    note what happens for an away win

    steve

  4. #4
    Registered User
    Join Date
    04-18-2004
    Posts
    13

    Worked, sort of!!!

    Quote Originally Posted by stevekirk
    i am assuming that if you do not put results in the cell will be empty

    if so try this

    =IF(AND(D2="",D3=""),"",IF(D2>D3,2,IF(D2=D3,1,0)))

    note what happens for an away win

    steve
    Hi Steve, thanks for your solution, it worked fine for one result, but I couldn't de-bug it for 20 different scenario's, probably down to my lack of knowledge??
    Thanks for your help

    tallchap

  5. #5
    Registered User
    Join Date
    04-18-2004
    Posts
    13

    Thanks

    Quote Originally Posted by Ruthki
    try something like

    =IF(D2>D3,2)+IF(AND(D2=0,D3=0),0,IF(D2=D3,1,0))

    R
    Hi Ruthki, this worked perfectly, once doctored to suit results over 20 different Cell selections.

    Thanks for your help.

    tallchap

+ 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