Quantcast
Channel: Microsoft Community - Super Fresh
Viewing all articles
Browse latest Browse all 1237235

IF first character in cell is negative place negative sign in front of resulting formula

$
0
0

Hello,

I have a formula that works great unless the source cell is negative. If negative than I get an incorrect value.

The formula looks like this

=TEXT(INT(A4),"0°")&TEXT(INT((A4-INT(A4))*60),"0'")&TEXT((A4*60-INT(A4*60))*60,"0.00")&""""

If Cell A4 is positive 33.333 I get 33°19'58.80" the correct value.

If Cell A4 is negative -33.33 I get -34°40'1.20" which is an incorrect value. It needs to be-33°19'58.80"

So IF the source cell is negative than I would like to add the "-" symbol in front of the final calculation.

Any suggestions?

If(left(A4,-,"-")and(bla bla bla

If(left(A4,-,)-1*((bla bla bla))


Viewing all articles
Browse latest Browse all 1237235

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>