rriiicchh

New Member
Joined
Aug 11, 2010
Messages
11
I have been bashing my head against this problem for a few hours and just when I thought I'd cracked it running some validation against the formula showed it adds up 1 year as 364 days so I have just shifted my problem.

In short I have two dates 02/11/2013 and 04/06/2014 and I need a formula to split the number of days between (and including) those dates between year end which in this case is always the 1st of April.

For example with the above it should be 149 and 65 and as another example if the dates were 31/03/2013 and 01/04/2014 then the result would need to be 1 and 1

With a field in the spreadsheet **FinancialYear** holding the year which I need to apportion the days between.

The spreadsheet looks like this:

StartDateEndDate
02/11/201304/06/2014

<tbody>
</tbody>


Financial YearDays
2012-2013Formula
2013-2014Formula

<tbody>
</tbody>





The formula I currently have is

Code:
=IF(IF(MONTH(NOW())<4,YEAR(NOW())-1&"-"&(YEAR(NOW())),YEAR(NOW())&"-"&(YEAR(NOW())+1))=**FinancialYear**,MAX(0,(MIN(**EndDate**,DATEVALUE("31/03/"&RIGHT(**FinancialYear**,4)))-MAX(**StartDate**,DATEVALUE("01/04/"&LEFT(**FinancialYear**,4)))+1)),MAX(0,(MIN(**EndDate**,DATEVALUE("31/03/"&RIGHT(**FinancialYear**,4)))-MAX(**StartDate**,DATEVALUE("01/04/"&LEFT(**FinancialYear**,4))))))

I know the above formula is wrong so I am hoping that someone can show me the error of my ways as this is the first time in a long time that I haven't been able to resolve an excel issue. I hate working with dates. Any help will be greatly appreciated.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
365 should occur if you run 00:00:00 1/4/ to 23:59:59 31/3, whats happening is (I believe) the date is a whole number only so to get the three six five, just getting into 31/3 doesn't give you the day, you need to add 1 to get to your comfort zone
 
Upvote 0
Is it?


Excel 2010
AB
1StartDateEndDate
231/03/201301/04/2013
3
4Financial YearDays
52012-20131
62013-20141
Sheet1
Cell Formulas
RangeFormula
B5=MIN(B$2,DATE(RIGHT(A5,4),3,31))-MAX(A$2,DATE(LEFT(A5,4),4,1))+1
 
Upvote 0

Forum statistics

Threads
1,215,615
Messages
6,125,854
Members
449,266
Latest member
davinroach

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