?
Solved

Need help with Excel formula

Posted on 2014-01-14
7
Medium Priority
?
325 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 1500 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

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