lookup date range or one earlier

Dares2

New Member
Joined
Feb 27, 2017
Messages
24
hi,
I am wanting to find a date in a range of dates and if its not there take the earlier date. This will then drive a sum offset indirect formula to pick up interest for the financial year.
Can anyone advise how to write this formula to find the exact date or one earlier? I would then question how I calculate total repayments since 30 June prior also?

Loans
Current Mth28/02/2017
closest date or one immediately prior28/02/2017This formula not correct
Cell referenceLoan!A10="Loan!"&VLOOKUP(B3,Loan!$A$9:$B$48,2,0)This is ok
Last twelve months
Total Loan Repayments last 12mths142,279.02
Loan Repayments since 30 June prior year
Total principle remaining

Thanks Darren
TABLE
Payment DateRefBeginning BalancePaymentPrincipalInterestEnding Balance
30/11/2016 A12 900,000.0071,139.5162,558.698,580.82837,441.31
28/02/2017 A13 837,441.3171,139.5158,749.9712,389.54778,691.34
31/05/2017 A14 1,588,691.3471,139.5147,246.4223,893.091,541,444.92
30/09/2017 A15 1,631,444.9271,139.5139,116.5632,022.951,592,328.36
30/11/2017 A16 1,592,328.3671,139.5155,172.6015,966.911,537,155.76
28/02/2018 A17 1,537,155.7671,139.5148,398.0322,741.481,488,757.73
31/05/2018 A18 1,488,757.7371,139.5148,624.6022,514.911,440,133.13
30/09/2018A191,440,133.1371,139.5042,257.9328,881.571,397,875.20
30/11/2018A201,397,875.2071,139.5157,122.4614,017.051,340,752.74
28/02/2019A211,340,752.7471,139.5051,303.7119,835.791,289,449.03
31/05/2019A221,289,449.0371,139.5151,638.8019,500.711,237,810.23
30/09/2019A231,237,810.2371,139.5146,315.4824,824.031,191,494.75
30/11/2019A241,191,494.7571,139.5159,191.9211,947.591,132,302.83
29/02/2020A251,132,302.8371,139.5154,201.5016,938.011,078,101.33
31/05/2020A261,078,101.3371,139.5154,835.0716,304.441,023,266.26
30/09/2020A271,023,266.2671,139.5050,618.1120,521.39972,648.15
30/11/2020A28972,648.1571,139.5161,386.389,753.13911,261.77
<colgroup><col width="260" style="width: 195pt; mso-width-source: userset; mso-width-alt: 9508;"> <col width="71" style="width: 53pt; mso-width-source: userset; mso-width-alt: 2596;"> <col width="100" style="width: 75pt; mso-width-source: userset; mso-width-alt: 3657;"> <col width="67" style="width: 50pt; mso-width-source: userset; mso-width-alt: 2450;"> <col width="64" style="width: 48pt; mso-width-source: userset; mso-width-alt: 2340;"> <col width="73" style="width: 55pt; mso-width-source: userset; mso-width-alt: 2669;"> <col width="82" style="width: 62pt; mso-width-source: userset; mso-width-alt: 2998;"> <tbody> </tbody>
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Try this formula in B2 to find exact date or one earlier;

If your date is in A2, and your table is in A5:G50 (please adjust this ranges in formula)

=INDEX(A6:A50,MATCH(MIN(IF(A2-A6:A50>=0,(ABS(A2-A6:A50)))),ABS(A2-A6:A50),0))

Enter with Ctrl+Shift+Enter, not just Enter.
 
Upvote 0
Thanks so much Rada. This helps me and thanks for quick response too. Need to learn this stuff.
 
Upvote 0
You are welcome.

I figured that I made this ABS part redundant, so you can use this formula

=INDEX(A6:A50,MATCH(MIN(IF(A2-A6:A50>=0,(A2-A6:A50))),(A2-A6:A50),0))

Both work the same.

I'm also learning, good luck. :)
 
Upvote 0
Thanks again Rada. Your help has been invaluable to solve a problem quickly too. Thankgoodness for this great community too.
 
Upvote 0

Forum statistics

Threads
1,215,537
Messages
6,125,390
Members
449,222
Latest member
taner zz

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