Search code examples
excelif-statementexcel-2011

How to use an IF statement to calculate commissions or flat fee


I am trying to use an IF statement in Excel. I would like the statement to do the following: I have three fields (C13, D16 and E16) that are user inputs. C13 holds a sales price, and then the user either enters a commission percentage rate (D16) or a flat fee (E16). If either one of these fields (D16 or E16) is NOT blank, I would like to apply a sum (for D16) or display the value entered (for E16) into D18.

This is what I have done so far, but obviously I have done something wrong as it is giving me an error:

IF(OR(NOT(ISBLANK(D16) C13*(D16*.01));(not(isblank(E16)=E16))) 

I am using Office 2011 for Mac.


Solution

  • Something like the following should be appropriate.

    =if(count(d16:e16)=1, if(d16, d16*c13, e16), "")
    

    (change the commas to semicolons if that is what your system uses as a list separator and multiply by 0.01 if those are not true percentages).