I'm having difficulties trying to create a formula. The formula is supposed to work as so:

B4-B15 is Inventory
C4-B15 is Total

If a cell F17-1000 contains any word listed in Inventory then any value entered adjacent cell (G17-1000) is deducted from the Total section corresponding to the inventory item listed.

I'm sorry if this doesn't make sense - but it's the best way I can explain it. I've been going rounds trying to get this figured out and any help would be appreciated.