-1

I need help with google sheets.

I got a decent formular, that calculates a time range out of for other cells.

=SUM(VALUE($C61)-VALUE($B61))+VALUE($E61)-VALUE($D61)

That works pretty well. But, it always displays "00:00" even if the other cells are all empty. I would like to replace the result "00:00" with "", but I do not want to have the calculation doubled in the formula like this:

=IF(SUM((VALUE($C61)-VALUE($B61))+VALUE($E61)-VALUE($D61))>0; SUM((VALUE($C61)-VALUE($B61))+VALUE($E61)-VALUE($D61)); "")

So, is there a neater way?

migrated from superuser.com Mar 11 '17 at 16:20

This question came from our site for computer enthusiasts and power users.

1

You need an intermediate step if you want to neaten it up.

Try using your first formula exactly as described in one column - which could be F61 in this example - then use G61 to perform your IF calculation using F61's contents to either return F61 or "".

=IF(F61 > 0; F61; "")

Then the magic... hide the F column!

Good luck.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy