Hi there, please excuse me as I'm newbie for excel formulas. I'm trying to create a mileage calculation chart.

E12= Starting Odometer
F12= Ending Odometer

B12= "Home" or "Office"
B7= Mile Value
G12= Result value

Basically I'm trying to accomplish F12-E12 and if B12 = Home, subtract B7.

I have this but not sure where is wrong as Im editing an existing formula:
=IF(OR(ISBLANK(E12),ISBLANK(F12),0,F12-E12,IF(B12="Home",-B7)))

Thank you in advance for your help
Hiroshi