#Div/0 error when cell value decrease

nevernine99

New Member
Joined
Dec 18, 2021
Messages
10
Office Version
  1. 2019
Platform
  1. Windows
In D7, When I increase value to 10 years or more. (Max is 40 yrs) it's automatically calculated in cells.
But when I decrease value to 5, I see #Div/0 error in cells. How do I leave cell blank if cell has #DIV/0 value?
I was trying with IFERROR function, but it doesn't work for me.

see attached XL2BB here. Thank you so much for your help.

Value based on year.xlsx
ABCDEFGHIJKLMNOPQRSTUV
1 Adjustable Rate Mortgage (ARM) Calculator
2
3Amortization Schedule[42]
4Loan InformationNo.Payment DateInterest RatePayment DueExtra PaymentInterestPrincipalBalanceTotal InterestTotal PrincipalYearAverage % RateExtra PaymentInterestPrincipalBalance
52.901%($596,000.00)$ 596,000
6Loan amount 596,000.0011-Jan-202.901%5,727.80100.001,440.784,387.02591,612.981,440.784,387.0220202.625%100.0015071.1752921.89543078.11
7Term (years) 1021-Feb-202.901%5,727.801,430.184,297.62587,315.362,870.968,684.6420213.417%100.0017809.1552547.44490530.67
8Starting interest rate 2.901%31-Mar-202.901%5,727.801,419.794,308.01583,007.354,290.7512,992.6520222.583%100.0012085.5956027.90434502.77
9First payment date 1-Jan-2041-Apr-202.901%5,727.801,409.374,318.43578,688.925,700.1217,311.0820232.000%0.008156.5358413.35376089.42
1051-May-202.901%5,727.801,398.934,328.87574,360.057,099.0521,639.9520242.000%0.006977.4959592.39316497.03
11Starting monthly payment 5,727.8061-Jun-203.000%5,752.941,435.904,317.04570,043.018,534.9525,956.9920252.000%0.005774.6660795.22255701.81
12.71-Jul-203.000%5,752.941,425.114,327.83565,715.189,960.0630,284.8220262.000%0.004547.5462022.34193679.47
13Rate Adjustments81-Aug-203.000%5,752.941,414.294,338.65561,376.5311,374.3534,623.4720272.000%0.003295.6563274.23130405.24
14RateAs Of …91-Sep-202.000%5,498.81935.634,563.18556,813.3512,309.9839,186.6520282.000%100.002017.8764652.0165753.23
15Start Rate 2.901%Jan-01-2020101-Oct-202.000%5,498.81928.024,570.79552,242.5613,238.0043,757.4420292.000%0.00713.5665753.230.00
16New Rates 3.000%Jun-01-2020111-Nov-202.000%5,498.81920.404,578.41547,664.1514,158.4048,335.852030#DIV/0!0.000.000.00 
172.000%Sep-01-2020121-Dec-202.000%5,498.81912.774,586.04543,078.1115,071.1752,921.89 #DIV/0!0.000.000.00 
184.000%Jan-01-2021{42}131-Jan-214.000%5,996.111,810.264,185.85538,892.2616,881.4357,107.74 #DIV/0!0.000.000.00 
193.000%Jun-01-2021141-Feb-214.000%5,996.11100.001,796.314,299.80534,592.4618,677.7461,407.54 #DIV/0!0.000.000.00 
203.000%Apr-01-2022151-Mar-214.000%5,996.111,781.974,214.14530,378.3220,459.7165,621.68 #DIV/0!0.000.000.00 
212.000%Aug-01-2022161-Apr-214.000%5,996.111,767.934,228.18526,150.1422,227.6469,849.86 #DIV/0!0.000.000.00 
22171-May-214.000%5,996.111,753.834,242.28521,907.8623,981.4774,092.14 #DIV/0!0.000.000.00 
23181-Jun-213.000%5,753.721,304.774,448.95517,458.9125,286.2478,541.09 #DIV/0!0.000.000.00 
24Summary191-Jul-213.000%5,753.721,293.654,460.07512,998.8426,579.8983,001.16 #DIV/0!0.000.000.00 
25Est. Max monthly payment 5,996.11201-Aug-213.000%5,753.721,282.504,471.22508,527.6227,862.3987,472.38 #DIV/0!0.000.000.00 
26Total payments 672,449.21211-Sep-213.000%5,753.721,271.324,482.40504,045.2229,133.7191,954.78 #DIV/0!0.000.000.00 
27Total interest 76,449.21221-Oct-213.000%5,753.721,260.114,493.61499,551.6130,393.8296,448.39 #DIV/0!0.000.000.00 
28Internal Rate of Return 2.45%231-Nov-213.000%5,753.721,248.884,504.84495,046.7731,642.70100,953.23 #DIV/0!0.000.000.00 
29241-Dec-213.000%5,753.721,237.624,516.10490,530.6732,880.32105,469.33 #DIV/0!0.000.000.00 
30251-Jan-223.000%5,753.721,226.334,527.39486,003.2834,106.65109,996.72 #DIV/0!0.000.000.00 
Loan Calc
Cell Formulas
RangeFormula
H5H5=D8
I5I5=-D6
M5M5=$D$6
F6:F30F6=IF(F5>=($D$7*12),"",F5+1)
G6:G30G6=IF(F6="","",DATE(YEAR($D$9),MONTH($D$9)+(F6-1),DAY($D$9)))
H6:H30H6=IF(ISNUMBER(G6),INDEX($C$15:$C$22,MATCH(G6,$D$15:$D$22,1)),"")
I6:I30I6=IF(F6="","",MIN(ROUND(IF(F6=1,$D$11,IF(H6=H5,I5,-PMT(H6/12,($D$7*12)-F6+1,M5))),2),M5+ROUND(H6/12*M5,2)))
K6:K30K6=IF(F6="","",ROUND(H6/12*M5,2))
L6:L30L6=IF(F6="","",I6-K6+J6)
M6:M30M6=IF(F6="","",M5-L6)
N6:N30N6=IF(F6="","",SUM(K$6:K6))
O6:O30O6=IF(F6="","",SUM(L$6:L6))
Q6Q6=YEAR(D9)
R6:R30R6=AVERAGEIFS($H$5:$H$484,$G$5:$G$484,">="&DATE(Q6,1,1),$G$5:$G$484,"<="&DATE(Q6,12,31))
S6:S30S6=IFERROR(SUMIFS(J$5:J$484,$G$5:$G$484,">="&DATE($Q6,1,1),$G$5:$G$484,"<="&DATE($Q6,12,31)),"")
T6:U30T6=IFERROR(SUMIFS(K$6:K$485,$G$6:$G$485,">="&DATE($Q6,1,1),$G$6:$G$485,"<="&DATE($Q6,12,31))," ")
V6:V30V6=IFERROR(VLOOKUP(DATEVALUE("December 1, " & $Q6),$G$4:$O$485,7,0),"")
Q7:Q30Q7=IFERROR(IF(Q6+1>(Q$6+D$7),"",Q6+1),"")
D11D11=ROUND(-PMT(D8/12,($D$7*12),$D$6),2)
D12D12=IF(($D$7*12)>480,"ERROR: >480 payments",".")
C15C15=D8
D15D15=$D$9
D25D25=MAX(I6:I485)
D26D26=SUM(K6:K485)+SUM(L6:L485)
D27D27=SUM(K5:K485)
D28D28=IRR(I5:I485,1%)*12
Cells with Data Validation
CellAllowCriteria
D15Any value
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
77,681
Office Version
  1. 365
Platform
  1. Windows
How about
Excel Formula:
=IFERROR(AVERAGEIFS($H$5:$H$484,$G$5:$G$484,">="&DATE(Q16,1,1),$G$5:$G$484,"<="&DATE(Q16,12,31)),"")
 

nevernine99

New Member
Joined
Dec 18, 2021
Messages
10
Office Version
  1. 2019
Platform
  1. Windows
The above formula works very well in column R. But when I used formulas with IFERROR in Column S, T, U, V.
I am getting "0.00" instead of blank cell.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
77,681
Office Version
  1. 365
Platform
  1. Windows
Firstly the formula in cols T & U have " " rather than ""
That said the sumifs will only return an error if there are error values in the sum range.
 

nevernine99

New Member
Joined
Dec 18, 2021
Messages
10
Office Version
  1. 2019
Platform
  1. Windows
@Fluff,
I tried both way for "" & " " but I got same result.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
77,681
Office Version
  1. 365
Platform
  1. Windows
Yes, but as I said sumifs will only return an error if there are error in the range you are summing.
As col J looks to be values rather than a formula, you will never get an error.
 

nevernine99

New Member
Joined
Dec 18, 2021
Messages
10
Office Version
  1. 2019
Platform
  1. Windows
I used following formula to match if column Q has value, and its works great.

=IF(Q31="","",IFERROR(SUMIFS(K$6:K$485,$G$6:$G$485,">="&DATE($Q31,1,1),$G$6:$G$485,"<="&DATE($Q31,12,31)),""))

Thank you for your help.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
77,681
Office Version
  1. 365
Platform
  1. Windows
Glad you sorted it & thanks for the feedback.
 

Forum statistics

Threads
1,175,962
Messages
5,900,557
Members
434,836
Latest member
YetAnotherDave

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
Top