close

I am trying to simply add times h:mm format.

=TEXT(F22-quot;37:30quot;,quot;h:mmquot;)
=TEXT(F49-quot;37:30quot;,quot;h:mmquot;)

These can and do give negative results because I am using the 1904 date
system.
But, if I try to sum the result of these two if any have a negative result I
get an error. I am using the below for the sum:

=F23 F50 all h:mm

So how do I add values when one is negative? Or is there another way?

Thanks!Hi!

Why are you using the TEXT function?

This is one of those quot;quirkyquot; things where I can't explain why it works the
way it does, I just know that it works the way it does!

The minus sign in a negative (TEXT) value can't be coerced into a numeric
negative so the value remains a TEXT value. When both values are positive
the act of adding them together:

value1 value2

coerces them into numeric numbers. If you tried using =SUM(value1,value2),
that would return 0 since both values are TEXT and SUM ignores text.

If you try to coerce -value1 using the unary operator it still errors
because -value1 is a TEXT value.

So, why are you using the TEXT function? Why not just: cell_ref-quot;37:30quot;

Then =F23 F50 will work.

Biff

quot;purtechquot; gt; wrote in message
...
gt;I am trying to simply add times h:mm format.
gt;
gt; =TEXT(F22-quot;37:30quot;,quot;h:mmquot;)
gt; =TEXT(F49-quot;37:30quot;,quot;h:mmquot;)
gt;
gt; These can and do give negative results because I am using the 1904 date
gt; system.
gt; But, if I try to sum the result of these two if any have a negative result
gt; I
gt; get an error. I am using the below for the sum:
gt;
gt; =F23 F50 all h:mm
gt;
gt; So how do I add values when one is negative? Or is there another way?
gt;
gt; Thanks!
gt;
gt;
gt;
gt;
gt;
gt;
gt;

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()