Make cells blank IF

R

RC

I have a formula as below, but want the cell to be blank (and not show the
words #Value!) if there is no data in a preceeding cell, say cell H2. How do
I do this?

=DATEVALUE(LEFT(G2,4)&"/"&MID(G2,5,2)&"/"&RIGHT(G2,2))+TIMEVALUE(LEFT(H2,2)&":"&RIGHT(H2,2))

This way the formula only gets enacted if a value is in the preceeding cell
and the spreadsheet looks a lot cleaner.

Many thanks
 
J

Jacob Skaria

=IF(H2="","",DATEVALUE(.........))

OR

=IF(OR(G2="",H2=""),"",DATEVALUE(.........))

Replace DATEVALUE(.........) with your formula

If this post helps click Yes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top