ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I create a formula that will do YTD calculations? (https://www.excelbanter.com/excel-programming/357421-how-do-i-create-formula-will-do-ytd-calculations.html)

Compliance Crazed

How do I create a formula that will do YTD calculations?
 
I am trying to determine how to write a formula that allows me to calculate
YTD earnings but I cannot figure how to get the year-to-date to work. I know
how to get the number of weeks from one date to another (for example
8/1/05-4/12/06 = 255 days or 36.43 weeks). My issue is that I want the
formula to count only the weeks YTD 1/1/06-4/12/06. I want the formula to
know that if my begin date is in a prior year to only look at the current
years weeks.

Any assistance would be appreciated. I cannot seem to find an easy solution.

via135[_2_]

How do I create a formula that will do YTD calculations?
 

hi!

assuming that the start date is in A1 & end date is in B1, enter
in C1: =(B1-A1)/7 and format C1 as Number.

-via135




Compliance Crazed Wrote:
I am trying to determine how to write a formula that allows me t
calculate
YTD earnings but I cannot figure how to get the year-to-date to work.
know
how to get the number of weeks from one date to another (for example
8/1/05-4/12/06 = 255 days or 36.43 weeks). My issue is that I want the
formula to count only the weeks YTD 1/1/06-4/12/06. I want the formul
to
know that if my begin date is in a prior year to only look at th
current
years weeks.

Any assistance would be appreciated. I cannot seem to find an eas
solution


--
via13
-----------------------------------------------------------------------
via135's Profile: http://www.excelforum.com/member.php...fo&userid=2672
View this thread: http://www.excelforum.com/showthread.php?threadid=52744


Carim

How do I create a formula that will do YTD calculations?
 
Hi,

With the same assumptions as via135, in cell C1 :
=IF(YEAR(A1)<YEAR(B1),(B1-(DATE(YEAR(B1),1,1)))/7,(B1-A1)/7)

HTH
Carim



All times are GMT +1. The time now is 10:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com