Share via

Microsoft Excel Formula

Anonymous
2024-08-07T12:45:28+00:00

Hello Microsoft Community,

I’m working on a formula in Excel,

Short story long I am setting up a s/sheet to record scores of a sports team, and I’m having trouble with a IF formula.

I have the following formula in cell D3 to add up what scores everyone gets

=SUM(H3:X3)

In cell E3 I have to manually input the oppositions score

So I have three outcomes they Won, Drew, Lost.

I have created

=IF(D3=E3,"DREW",IF(D3>E3,"WON","LOST")) which does the trick

But because I have all the cells already in all the columns for cells where a game has not yet played in cell

D3 the total shows 0

I wanted the W,D,L column to either be blank or have a different output for any game not yet played, I created the following, so rather than W,D,L it went blank

=IF(D3=E3,"T",IF(D3=0," ",IF(D3>E3,"W","L")))

Now oddly this works for the first 5 rows, but then stops working even though the formula is correct for all the cells

It doesn't have to be blank I just want it not to say W,D,L as the game has not yet been played

Thank you in advance

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

6 answers

Sort by: Most helpful
  1. HansV 462.6K Reputation points
    2024-08-07T18:54:16+00:00

    =IF(COUNTA(H8:X8)=0, "", SUM(H8:X8))

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2024-08-07T16:25:00+00:00

    Hi HansV

    That has worked perfectly, maybe I am being greedy now

    Is there a formula I can add to Cell D8, so column D will also be blank if there are no scores added?

    I currently have

    =SUM(H8:X8)

    to add up when scores are added, it would be tidier without all the zeroes below

    Thank you again

    Was this answer helpful?

    0 comments No comments
  3. HansV 462.6K Reputation points
    2024-08-07T15:03:35+00:00

    How about

    =IF(E3="", "", IF(D3=E3,"DREW",IF(D3>E3,"WON","LOST")))

    or

    =IF(E3="", "NOT PLAYED YET", IF(D3=E3,"DREW",IF(D3>E3,"WON","LOST")))

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2024-08-07T14:13:24+00:00

    Image

    Hope this helps

    The Pins against and Points scored would be manually entered

    I was hoping for a way that "Drew" was not shown as the game has not been played yet

    Was this answer helpful?

    0 comments No comments
  5. HansV 462.6K Reputation points
    2024-08-07T13:08:27+00:00

    Could you create a stripped-down copy of the workbook demonstrating the problem (without sensitive information) and make it available through one of the websites that let you upload and share a file, such as OneDrive, Google Drive, FileDropper or DropBox. Then post a link to the uploaded and shared file here.

    Was this answer helpful?

    0 comments No comments