If other cell is blank then do this math formula here, but if other cell not blank then copy it here

New Contributor

If other cell is blank, then do this math formula here. But if other cell is not blank then copy that here. For example, I have this formula: =IF(J2="","=SUM(F2:G2)*20%","=J2") but it is only copying the value/text and it won't actually do the math formula or display cell J2. Please help.

4 Replies
best response confirmed by DevinT21 (New Contributor)



Take away the quotes (and the extraneous equals signs). You are ASKING it to do text by putting those statements in quotes.

You have =IF(J2="","=SUM(F2:G2)*20%","=J2")

Should be =IF(J2="",SUM(F2:G2)*20%,J2)

Hi @mathetes,

That does not work. It is giving me an error.
Nevermind, I think it's working! Thank you!



If it's really not working, looking at it again, I think I'd change the 20% to a simple .2, so the revised formula would read =IF(J2="",SUM(F2:G2)*.2,J2)


I missed that the first time around, concentrating on the text aspect.