We help IT Professionals succeed at work.

I need an updated excel formula

wrt1mea
wrt1mea asked
on
I need to update the following formula to work ONLY if there is a value in Cell H2 (which is a date field) that is greater than 0. I was using the greater than 0 approach due to the date field being a number.

=IF(G2="","",IF(H2="",TODAY(),H2)-G2)
Comment
Watch Question

Author

Commented:
Crap...forgot to include this one too...

=IF(G2="","",NETWORKDAYS(G2,IF(H2="",TODAY(),H2)))
Excel VBA Developer
Top Expert 2014
Commented:
=IF(G2="","",IF(H2="",TODAY(),H2)-G2)
becomes
=IF(G2="","",IF(H2>0,H2,TODAY())-G2)


=IF(G2="","",NETWORKDAYS(G2,IF(H2="",TODAY(),H2)))
becomes
=IF(G2="","",NETWORKDAYS(G2,IF(H2>0,H2,TODAY())))

Author

Commented:
Works Perfectly! Thank you very much!