If Formula Help

New Contributor

Hi everyone! 
I am hoping someone can help me with this, I will try to explain it the best I can... 

I am having trouble getting the "IF" to read multiple cells and return the number... I can do it for one cell but I need it to view multiple... so


Cell D4 has a total Dollar amount

Cells B6:B30 have a dollar amount in them (like this item costs XX amount) 
Cells D6:D30 are blank but when something from the "B" column is purchased, a "P" will be placed in D6:D30 (depending on what was purchased) 

I need cell E4 to subtract the $ amount in B6:B30 from D4 but only if a "P" is placed in D6:D30
so each time a P is placed in column D, it subtracts that rows dollar amount from D4.... 

Hope that makes sence?

2 Replies


In E4:


I was putting the cell D4 at the end of the formula... and wasnt using sumif....
Thank you again!!