Formula Question

  • Thread starter Thread starter stevehat
  • Start date Start date
S

stevehat

I have a formula (geared towards adding up my project hours) that
reads, =A2-A1*24. This works fine. However, in addition, I need it
to also say if the result is zero then it should have a null value.
Is this possible?
 
I have a formula (geared towards adding up my project hours) that
reads, =A2-A1*24. This works fine. However, in addition, I need it
to also say if the result is zero then it should have a null value.
Is this possible?

=if(A2 - A1*24 = 0, "", A2 - A1*24)

Unfortunately, I don't know any way to avoid computing the formula
twice, unless you are willing to use a helper cell, which you could
hide.
 
=if(A2 - A1*24 = 0, "", A2 - A1*24)
Unfortunately, I don't know any way to avoid computing the formula
twice

Well, I am assured that you can leave the formula as you had it and
simply set up a custom formula. But I have not yet figured the
correct syntax :-(.

However, if you null values for zeros for the entire spreadsheet, you
could uncheck Tools -> Options -> View -> Zero Values.
 
Well, I am assured that you can leave the formula as you had it and
simply set up a custom formula. But I have not yet figured the
correct syntax :-(.

The Help documentation for custom formats leaves a lot to be desired.
But the following might suffice, if you currently use the General
format:

general;-general;
However, if you null values for zeros for the entire spreadsheet, you
could uncheck Tools -> Options -> View -> Zero Values.

But I usually avoid "format" options that affect the entire
spreadsheet.
 

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

Similar Threads


Back
Top