Need formula for Microsoft Excel that can calculate prices depending on more than one rule:

Date range (period from date : to date)
Type (Type 1,Type2,Type 3 etc.)
and Type2 (Type2 1, Type2 2, Type3 3 etc.)

For example:
DD/MM/YY
Dates 01.01.16 - 15.01.16 =2
Dates 16.01.16 - 31.01.16 =3
Type 1 = +2
Type 2 = +3
Type2 1 = -30%
Type2 2 = -50%

If "X" is on from 14.01.16 to 18.01.16, and is Type 1 + Type2 1:
than: "X"=(2*(2+2)(8) + 3*(3+2)(15))-30%