Make cells blank IF

  • Thread starter Thread starter RC
  • Start date Start date
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
 
=IF(H2="","",DATEVALUE(.........))

OR

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

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

If this post helps click Yes
 
Back
Top