Forum Discussion

Steven560's avatar
Steven560
Copper Contributor
Jul 24, 2022
Solved

Help Correcting a Formula

I am trying to use this formula and Excel keeps returning an error. Any help in identifying the error would be very appreciated.   =IF(A4="","",IF(SUM(A4-F49)>0),0,IF(SUM(A4-F49)>0),(SUM(A4-F49))) ...
  • Riny_van_Eekelen's avatar
    Jul 24, 2022

    Steven560 The error occurs due to incorrect placement of several brackets.

    A correct syntax would be (note that you don't need all the SUM functions):

     

    =IF(A4="","",IF(A4-F49>0,0,IF(A4-F49>0,A4-F49)))

     

    But, this formula makes no sense as you include two conditions IF(A4-F49>0,....... . You probably want the first one to be IF(A4-F49<=0,...... .

     

    And then you could just write: =MIN(0,A4-F49)

     

    Or, if you must return a blank if A4 is blank:

    =IF(A4="","",MIN(0,A4-F49))

     

Resources