Forum Discussion

DevinT21's avatar
DevinT21
Copper Contributor
Sep 13, 2022
Solved

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

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.

  • DevinT21 

     

    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)

4 Replies

  • mathetes's avatar
    mathetes
    Silver Contributor

    DevinT21 

     

    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)

    • DevinT21's avatar
      DevinT21
      Copper Contributor
      Nevermind, I think it's working! Thank you!
      • mathetes's avatar
        mathetes
        Silver Contributor

        DevinT21 

         

        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.

Resources