View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Colin Hayes Colin Hayes is offline
external usenet poster
 
Posts: 465
Default How to leave a formula cell blank when it has no calculation to make

In article , Paul B
writes
Colin, like this,
=IF(A1="","",DATEDIF(A1,NOW(),"y")&" years, "&DATEDIF(A1,NOW(),"ym")&"
months,"&DATEDIF(A1,NOW(),"md")&" days")


Hi again

Just an extra thought :

As an extension to this , can this formula be extended to compare 2
cells?

In column A I have a date (dd/mm/yy) when people joined a scheme.

In column B I have the date (dd/m/yy) they left the scheme. If they are
still in the scheme , this is blank because they are still current.

Could I show in column C therefore how long in years months and days
they were in the scheme?

The formula would assume that if the cell in the column B were blank ,
then they are still in the scheme and would give length of time to NOW()
, If there is content in B that it needs to take one from the other to
give the length in C.

Can this be done via formula?

Grateful for any help.

Best Wishes


Colin