• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

IF formula in a Blank Cell

Jeff S

New Member
Hi Chandoo,

I have been learning a great deal from your site, thank you so much!

I have searched your site and read several pages of information but did not seem to come across exactly what I was looking for so I decided to write my first post.

The problem I am having is using a formula for games that end in a tie.

Example: if I use the formula =IF(C6=E6,1,0) the correct result will appear, but if both cells are blank because the game has not yet been played, the result is 1. With several games still yet to be played, I do not want the points already tabulated.

The formula is good for a win or a loss but not for a tie. Is there a way correct the error?

File attached for clarification if needed. Thank you in advance!
Jeff S
 

Attachments

Hi Jeff ,

Excel has a function called ISBLANK which you can use to check if a cell is blank ; thus , if you change your IF statement to include a check which tests for either of the cells being blank , then , you will have :

=IF(OR(ISBLANK(C6),ISBLANK(E6)),0,IF(C6=E6,1,0))

What the first IF says is if either of C6 , E6 is blank , then the output is 0.

The second IF will be executed only if both C6 and E6 are non-blank ; in that case if both C6 and E6 are equal , the output will be 1 else it will be 0.

Narayan
 
Back
Top