If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
One More on Date Function
Everybody that helped me in my previous question was a
great help....thanks! Now, I have this and it works.....but........ =IF(DATEDIF(RIGHT(A4,10),TODAY(),"Y")=0,"",DATEDIF (RIGHT (A4,10),TODAY(),"Y")&" "&"year"&" & ")&DATEDIF(RIGHT (A4,10),TODAY(),"YD")&" "&"days" I have a spreadsheet for each year. So if it's 2004 and I look at the 2003 spreadsheet it will give me an inaccurate number of days for 2003. I'm trying to say if it is = to 12/31(of the report year)...that's what a2 is, to do the datedif from right(a4,10) to 12/31/a2. Otherwise if its not greater than 12/31/a2....to go ahead and do the datediff using Today(). Below is what I think it should look like, but still getting an error. =If (today() ="12/31"&a2,datedif(right(a4,10),"12/31"&a2) & IF(DATEDIF(RIGHT(A4,10),TODAY(),"Y")=0,"",DATEDIF( RIGHT (A4,10),TODAY(),"Y")&" "&"year"&" & ")&DATEDIF(RIGHT (A4,10),TODAY(),"YD")&" "&"days" Thanks in advance, Kacy |
#2
|
|||
|
|||
One More on Date Function
Got it figured out.......
-----Original Message----- Everybody that helped me in my previous question was a great help....thanks! Now, I have this and it works.....but........ =IF(DATEDIF(RIGHT(A4,10),TODAY(),"Y")=0,"",DATEDI F(RIGHT (A4,10),TODAY(),"Y")&" "&"year"&" & ")&DATEDIF(RIGHT (A4,10),TODAY(),"YD")&" "&"days" I have a spreadsheet for each year. So if it's 2004 and I look at the 2003 spreadsheet it will give me an inaccurate number of days for 2003. I'm trying to say if it is = to 12/31(of the report year)...that's what a2 is, to do the datedif from right(a4,10) to 12/31/a2. Otherwise if its not greater than 12/31/a2....to go ahead and do the datediff using Today(). Below is what I think it should look like, but still getting an error. =If (today() ="12/31"&a2,datedif(right(a4,10),"12/31"&a2) & IF(DATEDIF(RIGHT(A4,10),TODAY(),"Y")=0,"",DATEDIF( RIGHT (A4,10),TODAY(),"Y")&" "&"year"&" & ")&DATEDIF(RIGHT (A4,10),TODAY(),"YD")&" "&"days" Thanks in advance, Kacy . |
Thread Tools | |
Display Modes | |
|
|