Thread: Return Blank Value of cells are blank

1. Registered User
Join Date
Apr 2006
Posts
65

Unanswered: Return Blank Value of cells are blank

hi,
please consider the following formula, I am trying to get it to return a blank if either C2 OR D2 or both are blank, they are both date values. Can anyone please help with this, many thanks

=IF(A2="open",(DATEDIF(C2,NOW(),"d")*100/(DATEDIF(C2,D2,"d"))),IF(A2="in set-up",(DATEDIF(C2,NOW(),"d")*100/(DATEDIF(C2,D2,"d"))),IF(A2="closed - in follow-up",DATEDIF(C2,F2,"d")*100/DATEDIF(C2,D2,"d"),IF(A2="closed - follow-up complete",DATEDIF(C2,F2,"d")*100/DATEDIF(C2,D2,"d"),""))))

I have tried the following:
=IF(A2="open",(DATEDIF(C2,NOW(),"d")*100/(DATEDIF(C2,D2,"d"))),IF(A2="in set-up",(DATEDIF(C2,NOW(),"d")*100/(DATEDIF(C2,D2,"d"))),IF(A2="closed - in follow-up",DATEDIF(C2,F2,"d")*100/DATEDIF(C2,D2,"d"),IF(A2="closed - follow-up complete",DATEDIF(C2,F2,"d")*100/DATEDIF(C2,D2,"d"),IF(OR(C2=0,D2=0),"","")))))

but his returns 100% if C2 is blank and #NUM! if D2 is blank

2. Registered User
Join Date
Apr 2004
Location
Derbyshire, UK
Posts
803
Hi

You could try this

??

MTB

3. Registered User
Join Date
Apr 2006
Posts
65
That works well Mike TYVM,
i had tried that but my syntax was incorrect

4. Grumpy old man (training)
Join Date
Sep 2006
Location
Surrey, UK
Posts
1,085