Solved

Allocating days with a date range into years

Posted on 2013-06-03
6
337 Views
Last Modified: 2013-10-09
Hi

I am trying to allocate days between a date range into years.

so

Start Date 16-2-2012 End Date 01/3/2015.  There are 1109 days between this range.

I need to spread 319 days into 2012, 365 into 2013, 365 into 2014 and 60 days into 2015.

The file attached will do the allocation for 2012,2013,2014 but I need to add something to the formula so it puts the last 60 days into 2015.

I am assing a full year ends on the 31 December.  

Is anyone able to help modify the formula in the file attahed.

Thanks for your help
EE-Spread-Formula.xlsx
0
Comment
Question by:1benjiman
  • 3
6 Comments
 
LVL 49

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 39216108
Pls try this

=MAX(0,MIN($F$5,P4)-MAX($E$5,O4))

Regards
Copy-of-EE-Spread-Formula.xlsx
0
 

Author Closing Comment

by:1benjiman
ID: 39216161
Thanks for your help
0
 
LVL 35

Expert Comment

by:[ fanpages ]
ID: 39216341
Hi,

I have looked at the solution posted by Rgonzo1971, & have found some issues when the Start Date &/or End Date are changed.

Please look at the attached workbook.

Your initial row is still present (row #5).
Rgonzo1971's proposal is on row #6.

I have added rows #8 to #14.

Try changing row #6 to any of the Start Date/End Date combinations I have in rows #8 to #14 & you will see the "TOTAL" column I have added [T] that sums all the allocation values does not match the value in column [G].

However, my rows #8 to #14 are calculating the correct allocation values.

Please note that row #14 uses a random Start Date & a random Value so, with Automatic Calculation enabled, simply using function key [F9] will produce a further random Start Date & a random Value.

BFN,

fp.
Q-28145830.xlsx
0
 
LVL 35

Expert Comment

by:[ fanpages ]
ID: 39218214
Thanks for your input, modus_operandi.

Obviously, with option #3, I would select my comment ID: 39216341 as the only solution.

This is not being biased; this is simply on the premise that the previously accepted solution is flawed.
0
 
LVL 35

Expert Comment

by:[ fanpages ]
ID: 39559510
1benjiman has not returned, modus_operandi.

I guess we'll never know... :(
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
EXCEL 2013 question. 4 28
Dropbox in Windows Server 2008 4 31
Excel file that does not ask to be saved before exiting 6 23
sort column using vba 2 19
INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question