Look up a month and date to compare

Dares2

New Member
Joined
Feb 27, 2017
Messages
29
Office Version
  1. 365
Platform
  1. Windows
Hello I am looking at calculating interest depending if the month and date are within the range of a term deposit.

My formula appears to work for the current year in question but not for the following year. Formulae is as follows thanks.
=IF(TEXT(R$4,"mmyyyy")>TEXT($G5,"mmyyyy"),0,IF(TEXT(R$4,"mmyyyy")=TEXT($G5,"mmyyyy"),$D5*$E5*SUM(($G5-$J$4)/365),$D5*$E5*SUM((R$4-Q$4)/365)))
 

Attachments

  • interest by month calc.jpg
    interest by month calc.jpg
    82.9 KB · Views: 4
You shouldn't be using comparators like ">" on text values. Your month start/end dates are also inconsistent:

LMNO
3Start1/08/202431/08/20241/10/2024
4End31/08/202430/09/202431/10/2024
Sheet1

I think this is what you're after?

ABCDEFGHIJKLMNOPQR
1StartEnd1 Jun 20231 Jul 20231 Aug 20231 Sep 20231 Oct 20231 Nov 20231 Dec 20231 Jan 20241 Feb 20241 Mar 20241 Apr 20241 May 20241 Jun 20241 Jul 20241 Aug 2024
211 Jul 202310 Jul 202430 Jun 202331 Jul 202331 Aug 202330 Sep 202331 Oct 202330 Nov 202331 Dec 202331 Jan 202429 Feb 202431 Mar 202430 Apr 202431 May 202430 Jun 202431 Jul 202431 Aug 2024
3
4No days0203130313031312931303130100
Sheet1
Cell Formulas
RangeFormula
D4:R4D4=MAX(0,MIN(D2,End)-MAX(D1-1,Start))
Named Ranges
NameRefers ToCells
End=Sheet5!$B$2D4:R4
Start=Sheet5!$A$2D4:R4
 
Upvote 0
Solution

Forum statistics

Threads
1,226,840
Messages
6,193,270
Members
453,786
Latest member
ALMALV

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