Purple_Girl
New Member
- Joined
- Oct 12, 2010
- Messages
- 23
Hello,
I am trying to calculate the following:
If the Date in column J is less than or equal to the Date in column S, then calculate the number of days between column T and column S
Otherwise, if the Date in column J is greater than the Date in column S, then calculate the number of days between column J and column T
J (start date)
S (another start date)
T (end date)
Can anyone out there help me?!!! I have been spinning my wheels for a looong time on this. My current formula works if the date in column J is on the "1st" of the month (i.e., 1/1/2011), but if it is on another day of the month (i.e., 1/7/2011), it doesn't give me the correct total - it subtracts or adds the number of days from the 1st of the month...very strange. Therefore, my formula works for some (that start on the "1st"), but not all!!
Formulas I've tried:
=IFERROR(IF(DATE(YEAR(J3)+5,MONTH(J3),DAY(J3)<S3),DATEDIF(S3,T3,"MD"),DATEDIF(J3,T3,"MD"))," ")
=IFERROR(IF(J3<S3,DATEDIF(S3,T3,"MD"),DATEDIF(J3,T3,"MD")),"-")
I appreciate any help I can get!!!
Thank you!
I am trying to calculate the following:
If the Date in column J is less than or equal to the Date in column S, then calculate the number of days between column T and column S
Otherwise, if the Date in column J is greater than the Date in column S, then calculate the number of days between column J and column T
J (start date)
S (another start date)
T (end date)
Can anyone out there help me?!!! I have been spinning my wheels for a looong time on this. My current formula works if the date in column J is on the "1st" of the month (i.e., 1/1/2011), but if it is on another day of the month (i.e., 1/7/2011), it doesn't give me the correct total - it subtracts or adds the number of days from the 1st of the month...very strange. Therefore, my formula works for some (that start on the "1st"), but not all!!
Formulas I've tried:
=IFERROR(IF(DATE(YEAR(J3)+5,MONTH(J3),DAY(J3)<S3),DATEDIF(S3,T3,"MD"),DATEDIF(J3,T3,"MD"))," ")
=IFERROR(IF(J3<S3,DATEDIF(S3,T3,"MD"),DATEDIF(J3,T3,"MD")),"-")
I appreciate any help I can get!!!
Thank you!