IF to subtract multiple rows based on other cells contents

Kurtin

New Member
Joined
Jan 20, 2021
Messages
27
Office Version
  1. 365
Platform
  1. Windows
Heya,

So I have a total amount, which is the sum of a column, but I now want to have a cell for leftover amount. I am wondering how to subtract the amounts from the total based on if another cell says yes or not.

I attempted a formula but that just resulted in a #SPILL! error, which spans the same amount of cells that is listed in the $amount column. If anyone has any other formulas that could work, or a way to fix this one it would be greatly appreciated. Thank you in advance!!

RevHappy Expenses Tracker.xlsx
DEFGH
1TOTAL $ AMOUNT$ 100.00$ AMOUNT OWED REMAINING#SPILL!
2QTYDATE OF PURCHASE$ AMOUNTPAID (YES/NO)DATE PAID
3$ 20.00 yes
4$ 20.00
5$ 20.00
6$ 20.00
7$ 20.00
EXPENSES
Cell Formulas
RangeFormula
F1F1=SUM(Table1[$ AMOUNT])
H1H1=IF(Table1[PAID (YES/NO)]="YES",F1-Table1[$ AMOUNT],"")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A3:H7Expression=$G3=""textNO
A3:H7Expression=$G3="YES"textNO
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Try:

Book1
DEFGH
1TOTAL $ AMOUNT100$ AMOUNT OWED REMAINING80
2QTYDATE OF PURCHASE$ AMOUNTPAID (YES/NO)DATE PAID
320yes
420
520
620
720
Sheet5
Cell Formulas
RangeFormula
F1F1=SUM(Table1[$ AMOUNT])
H1H1=F1-SUMIF(Table1[PAID (YES/NO)],"yes",Table1[$ AMOUNT])
 
Upvote 0
Solution
Try:

Book1
DEFGH
1TOTAL $ AMOUNT100$ AMOUNT OWED REMAINING80
2QTYDATE OF PURCHASE$ AMOUNTPAID (YES/NO)DATE PAID
320yes
420
520
620
720
Sheet5
Cell Formulas
RangeFormula
F1F1=SUM(Table1[$ AMOUNT])
H1H1=F1-SUMIF(Table1[PAID (YES/NO)],"yes",Table1[$ AMOUNT])
Worked PERFECTLY thank you so much! I understand where I went wrong
 
Upvote 0

Forum statistics

Threads
1,214,951
Messages
6,122,442
Members
449,083
Latest member
Ava19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top