Dec 18, 2019 02:40 PM
Hey Guys,
Trying to figure out how to leave a cell BLANK.
I’m tracking soccer games.
Here’s my formula:
IF({Home Score} > {Away Score}, {Home Team} & " " & “Wins!!”,IF({Away Score}>{Home Score},{Away Team} & " " & “Wins!”,IF({Home Score}={Away Score},“Draw”)))
The first part is ok. I get the right values for HOME / AWAY & DRAW. the problem is with future games, where the “score” cells are still empty, I get “Draw”. technically it’s true, but I’d like to leave the cell empty or insert a placeholder text instead.
Thanks in advance.
Solved! Go to Solution.
Dec 18, 2019 04:17 PM
You’ll want to first check if both scores are empty (or alternatively, if both scores are entered), then run the rest of your formula.
IF(AND({Home Score}, {Away Score}), IF({Home Score} > {Away Score}, {Home Team} & " Wins!", IF({Away Score} > {Home Score}, {Away Team} & " Wins!", IF({Home Score} = {Away Score}, "Draw"))))
You can also simplify your formula a little like so:
IF(AND({Home Score, {Away Score}), IF({Home Score} = {Away Score}, "Draw", IF({Home Score} > {Away Score}, {Home Team}, {Away Team}) & " Wins!"))
Dec 18, 2019 04:17 PM
You’ll want to first check if both scores are empty (or alternatively, if both scores are entered), then run the rest of your formula.
IF(AND({Home Score}, {Away Score}), IF({Home Score} > {Away Score}, {Home Team} & " Wins!", IF({Away Score} > {Home Score}, {Away Team} & " Wins!", IF({Home Score} = {Away Score}, "Draw"))))
You can also simplify your formula a little like so:
IF(AND({Home Score, {Away Score}), IF({Home Score} = {Away Score}, "Draw", IF({Home Score} > {Away Score}, {Home Team}, {Away Team}) & " Wins!"))
Dec 18, 2019 09:50 PM
Thanks kamille! I really appreciate it.