ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   &TEXT formula (https://www.excelbanter.com/excel-worksheet-functions/155703-text-formula.html)

lrcburgers

&TEXT formula
 
I have and & TEXT formula that makes a statement like:

Month: 5.1 Chg YTD -2.5

In the &TEXT formula, how do I format the numbers so that all negative
value's will show in red. Below is my formula:
=B5&TEXT(" ",0)&TEXT(C5,"0.0")&TEXT(" ",0)&E5&TEXT("
",0)&TEXT(F5,"0.0%")

Peo Sjoblom

&TEXT formula
 
No need for those extra TEXT parts

=B5&" "&TEXT(C5,"0.0")&" "&E5&" "&TEXT(F5,"0.0%")

However you cannot change part of the formula to red, you can change the
whole formula result to red based on any of the values by using
formatconditional formatting



--
Regards,

Peo Sjoblom



"lrcburgers" wrote in message
...
I have and & TEXT formula that makes a statement like:

Month: 5.1 Chg YTD -2.5

In the &TEXT formula, how do I format the numbers so that all negative
value's will show in red. Below is my formula:
=B5&TEXT(" ",0)&TEXT(C5,"0.0")&TEXT(" ",0)&E5&TEXT("
",0)&TEXT(F5,"0.0%")




Harlan Grove[_2_]

&TEXT formula
 
"Peo Sjoblom" wrote...
No need for those extra TEXT parts

=B5&" "&TEXT(C5,"0.0")&" "&E5&" "&TEXT(F5,"0.0%")

....

No need for most of those text constants.

=B5&TEXT(C5," 0.0")&" "&E5&TEXT(F5," 0.0%")



Dave Peterson

&TEXT formula
 
or even:
=B5&TEXT(C5," 0.0 ")&E5&TEXT(F5," 0.0%")


Harlan Grove wrote:

"Peo Sjoblom" wrote...
No need for those extra TEXT parts

=B5&" "&TEXT(C5,"0.0")&" "&E5&" "&TEXT(F5,"0.0%")

...

No need for most of those text constants.

=B5&TEXT(C5," 0.0")&" "&E5&TEXT(F5," 0.0%")


--

Dave Peterson


All times are GMT +1. The time now is 06:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com