SOLVED

Excel code for IF function in Office 365

Brass Contributor

=IF(C5>D5,"WALES","DENMARK")

so this says insert Wales or Denmark depending on the values in C5 and D5. What do I add so that the output is blank / an empty string if C5 and D5 are empty? Thanks for any help. Dennis

3 Replies
best response confirmed by DennisMetro (Brass Contributor)
Solution

@DennisMetro 

Perhaps

=IF( (C5="")*(D5=""), "",
 IF ( C5>D5,"WALES","DENMARK") )

 

Thanks Sergei. That works well. Thank you very much. Dennis

@DennisMetro , you are welcome

1 best response

Accepted Solutions
best response confirmed by DennisMetro (Brass Contributor)
Solution

@DennisMetro 

Perhaps

=IF( (C5="")*(D5=""), "",
 IF ( C5>D5,"WALES","DENMARK") )

 

View solution in original post