Solved

Need help with Excel formula

Posted on 2014-01-14
7
320 Views
Last Modified: 2014-02-05
Hello-

I have the following worksheet attached with the following fields.

Tracking ID
Project date
Project value
Savings
Year
Project Length

I am trying to come up with a formula to calculate project value by how long the project is. For example if the project date is 1/1/2014, the project was for 2 years, and valued at $100, the project value by year would be $50 in 2014 and $50 in 2015.

See attached file.
0
Comment
Question by:tawathav
7 Comments
 
LVL 23

Expert Comment

by:NBVC
ID: 39780319
no attachment....
0
 

Author Comment

by:tawathav
ID: 39780335
0
 
LVL 81

Expert Comment

by:byundt
ID: 39780362
If you don't need to pro-rate projects for partial years, you could use:
=AND(E2>=YEAR(B2),E2<=YEAR(B2)+F2-1)*C2/F2
0
 
LVL 81

Expert Comment

by:byundt
ID: 39780549
If years need to be pro-rated because projects don't always begin on January 1, then the formula gets more complex:
=IF(YEAR(B2)=E2,(DATE(YEAR(B2)+1,1,1)-B2)/(365+(MOD(YEAR(B2),4)=0)),
IF(YEAR(DATE(YEAR(B2)+F2,MONTH(B2),DAY(B2))-1)=E2,(DATE(YEAR(B2)+F2,MONTH(B2),DAY(B2))-1-DATE(YEAR(B2)+F2-1,1,0))/(365+(MOD(E2,4)=0)),
AND(E2>=YEAR(B2),E2<=YEAR(B2)+F2-1)))*C2/F2
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 500 total points
ID: 39780659
Hello Brad,

I tried that longer formula with the "Project Date" for Project id 2 set to 1st May 2014 for all rows - the values returned for all years were as I expected except for 2019 when I got 1328.77 instead of the expected 328.77.

I think you can use this formula in row 2 copied down

=C2/F2*MAX(0,MIN(DATE(E2+1,1,1),EDATE(B2,F2*12))-MAX(B2,DATE(E2,1,1)))/(365+COUNT(E2&"-2-29"))

see comparison attached

regards, barry
Savings-worksheet-barry.xlsx
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

792 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