Multiple IF calculation

Multiple IF calculation

I'm trying to write an if statement that is fairly complex.  In Excel, the formula looks like this:

+IF(E2<0.2,(F2*0.05)*0.7,IF(E2<0.4,(F2*0.15)*0.7,IF(E2>0.39,(F2*0.2)*0.7)))


Using the value of a specific cell (depending upon if it is lower, between or above a certain value) I am applying one of 3 mathematical operations to a different cell for the result.  When trying to "map" this style over to the "IF" statements in Analytics, I am receiving errors.  Here is an example of the data I'm trying to reproduce (It's a commission table).  In the formula above E2 is the GM% column and F2 is the GM$ column.


Gross Margin %
Gross Margin $
Commission $
18%
10,000
350
36%
10,000
1,050
41%
10,000
1,400

If any help can be provided with this IF statement, I would greatly appreciate it!!!