Forum Discussion
Subtract items from running total
- Feb 07, 2018
Joe,
You can use a formula like this:
=SUMIF(C2:C13,"No",B2:B13)
To add only the item prices that have a purchase status of no.
Please find the attached file.
Joe,
You can use a formula like this:
=SUMIF(C2:C13,"No",B2:B13)
To add only the item prices that have a purchase status of no.
Please find the attached file.
Not sure i need the "No" formula as I did get this to work but it's only for one row,
=IF(OR(C3={"Yes"}),B14-B3)
Seems like if i could add the addtional rows it would work. I need to add these to the formula
IF(OR(C4={"Yes"}),B14-B4)
IF(OR(C5={"Yes"}),B14-B5)
IF(OR(C6={"Yes"}),B14-B6)
so forth for the remaining rows.
I've included the excel file.
I tried this with no luck.
=IF(OR(C3={"Yes"}),B14-B3)(OR(C4={"Yes"}),B14-B4)
- Haytham AmairahFeb 07, 2018Silver Contributor
Joe,
The logic of my formula in the previous answer is simple and straightforward, and it's the best solution for your question!
What you want is to subtract any purchased item from the total, so the best and shortest way or algorithm is to sum only the items that ware not purchased so that any purchased item won't be included in the remaining purchases total.
Put this formula in cell B15 and see how it works:
=SUMIF(C3:C12,"no",B3:B12)
- Joe SixpackFeb 07, 2018Copper Contributor
Thought i had it with this but it's only subtracting the c3 cell.
=IF(OR(C3={"Yes"}),B14-B3,IF(OR(C4={"Yes"}),B14-B4,IF(OR(C5={"Yes"}),B14-B5)))
- Joe SixpackFeb 07, 2018Copper Contributor