Forum Discussion
JessicaMarie
Jul 25, 2023Copper Contributor
If, Else, But formula?
How do I write a formula that goes like this:
If A2 is greater than 10, SUM1, else SUM2, but if A2 is blank, insert "0"
This bit works great:
=IF(A2>10,SUM(A1,B1),SUM(A1,C1))
I can't figure out how to include the condition if A2 is blank show a zero.
I've tried variants of AND/OR/NOT (A2<>"","0"), but no matter where I put that, I break the formula, nothing gets calculated, and there aren't even any errors, just a red dashed outline on the cell.
Is there a way to do what I'm trying to do? Any help, feedback, etc. is much appreciated. THANK YOU!
=IF(A2="", 0, IF(A2>10,SUM(A1,B1),SUM(A1,C1)))
or
=IF(A1="", 0, SUM(A1, IF(A2>10, B1, C1)))
=IF(A2="", 0, IF(A2>10,SUM(A1,B1),SUM(A1,C1)))
or
=IF(A1="", 0, SUM(A1, IF(A2>10, B1, C1)))
- JessicaMarieCopper Contributor
HansVogelaar These both work beautifully. Thank you!