Solved

Need help with Excel formula

Posted on 2014-01-14
7
322 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 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

688 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