#1   Report Post  
Posted to microsoft.public.excel.misc
Ltat42a
 
Posts: n/a
Default display yrs of Svc


Hi...hope you can help.

I have a few worksheets with some personnel info. I put all of this in
one worksheet. One of the items I have listed is their promotion date.

On another worksheet, I copy the promotion date so I can do a
calculation (=Personnel!E6). The formula I use to calculate their time
in grade is
=IF(E8<"",DATEDIF(E8,TODAY(),"y"),"")

The problem I have, if the promotion date in the "Personnel" sheet is
blank, the formula is returning a value of 106 instead of being blank
until I enter a promotion date on the "Personnel" worksheet.

Cell E6 on the "personnel" sheet is the promotion date
Cell E8 on "sheet2" is copied from the personnel sheet
Cell E9 on "sheet2" contains the above formula, and it's returning a
value of 106.

Is there a way to fix that?
Thanx


--
Ltat42a
------------------------------------------------------------------------
Ltat42a's Profile: http://www.excelforum.com/member.php...o&userid=24735
View this thread: http://www.excelforum.com/showthread...hreadid=498919

  #2   Report Post  
Posted to microsoft.public.excel.misc
pinmaster
 
Posts: n/a
Default display yrs of Svc


That is because excel see's a blank cell as 0 Jan 1900 so.

Instead of:

=Personnel!E6
use
=IF(Personnel!E6<"",Personnel!E6,"")

HTH
JG


--
pinmaster
------------------------------------------------------------------------
pinmaster's Profile: http://www.excelforum.com/member.php...fo&userid=6261
View this thread: http://www.excelforum.com/showthread...hreadid=498919

  #3   Report Post  
Posted to microsoft.public.excel.misc
Roger Govier
 
Posts: n/a
Default display yrs of Svc

Hi

One way would be to just test that E80
=IF(E80,DATEDIF(E8,TODAY(),"y"),"")
If E6 is blank, then copying E6 would return 0 which Excel would
interpret as being day 0 (01 Jan 1900) hence the Datedif calculation
returns 106 years.


--
Regards

Roger Govier


"Ltat42a" wrote
in message ...

Hi...hope you can help.

I have a few worksheets with some personnel info. I put all of this in
one worksheet. One of the items I have listed is their promotion date.

On another worksheet, I copy the promotion date so I can do a
calculation (=Personnel!E6). The formula I use to calculate their time
in grade is
=IF(E8<"",DATEDIF(E8,TODAY(),"y"),"")

The problem I have, if the promotion date in the "Personnel" sheet is
blank, the formula is returning a value of 106 instead of being blank
until I enter a promotion date on the "Personnel" worksheet.

Cell E6 on the "personnel" sheet is the promotion date
Cell E8 on "sheet2" is copied from the personnel sheet
Cell E9 on "sheet2" contains the above formula, and it's returning a
value of 106.

Is there a way to fix that?
Thanx


--
Ltat42a
------------------------------------------------------------------------
Ltat42a's Profile:
http://www.excelforum.com/member.php...o&userid=24735
View this thread:
http://www.excelforum.com/showthread...hreadid=498919



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I don't want to display any controls in excel. areddy Excel Discussion (Misc queries) 0 October 31st 05 08:46 AM
Report that display percentage below certain level TSS Excel Discussion (Misc queries) 1 September 1st 05 04:56 PM
How do you display Greek and Russian languages in excel? Mark Hayden Excel Discussion (Misc queries) 1 August 1st 05 08:06 AM
Conditional display of a .jpeg file? sbhogle Excel Discussion (Misc queries) 2 November 30th 04 05:57 AM
Combine & Display “Fixed” & “Automatically Updated” Date Parts texcel Excel Worksheet Functions 1 November 1st 04 05:38 PM


All times are GMT +1. The time now is 05:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"