A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

One More on Date Function



 
 
Thread Tools Display Modes
  #1  
Old October 2nd, 2003, 09:41 PM
Kreiss
external usenet poster
 
Posts: n/a
Default 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  
Old October 3rd, 2003, 07:17 PM
Kreiss
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:45 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.