![]() |
#1
|
|||
|
|||
![]()
I have two fields which I an concerned with, A1 and A2. In A1 I have a fixed date, we'll say 1/1/11. In A2 I want it to calculate the time that has passed since that date. SO if today was 2/1/11 in A2 it would say 1mos. I am targeting years and months and I'm not really concerned with days. Is this possible? Thanks!
|
#2
|
||||
|
||||
![]()
Perhaps
Code:
=IF(DATEDIF(A1,A2,"y")=0,"",DATEDIF(A1,A2,"y")&" years ")&IF(DATEDIF(A1,A2,"ym")=0,"", DATEDIF(A1,A2,"ym")&" months ")&DATEDIF(A1,A2,"md")&" days"
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
#3
|
|||
|
|||
![]()
It says Circular Reference Warning and the result of the cell is 0
|
#4
|
||||
|
||||
![]()
Ooops , sorry
Replace A2 with TODAY() in the above formula tHat should do the trick
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
#5
|
|||
|
|||
![]()
Hi Lights,
I'm not a big fan of adding text to the formula result because it stops you using that answer in another formula. I would possibly use the following formula: =(MONTH(TODAY())+YEAR(TODAY())*12)-(MONTH(A1)+YEAR(A1)*12) This will give you an integer (whole number) as a result. After that I would use a custom format to add the text that you want into the same cell as the formula. After you enter the formula:
|
#6
|
||||
|
||||
![]()
Caholmes
your formula does not take the day into account but only months, therefore creating a result which might not be what the OP needs. Test it for March 31st and you will see that it returns 1 month, although it's less than one month. ( 19 days today) If one is only concerned about the number of months Code:
=DATEDIF(A1,today(),"m") But then again, as is common with dates, the OP did not specify what he wants exactly
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
![]() |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
calculation of start date | ketanco | Project | 1 | 02-29-2012 07:01 AM |
![]() |
danbl | Excel | 8 | 02-23-2012 04:35 AM |
![]() |
manich1 | Excel | 2 | 12-07-2011 02:59 PM |
![]() |
UnholySmoke | Excel | 2 | 09-14-2011 08:15 AM |
![]() |
Snvlsfoal | Excel | 1 | 08-11-2011 05:54 AM |