Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Return Blank Value of cells are blank

$
0
0
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

Viewing all articles
Browse latest Browse all 13329

Trending Articles