ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   format a number appearing in a text formula (https://www.excelbanter.com/excel-discussion-misc-queries/230336-format-number-appearing-text-formula.html)

ogerriz

format a number appearing in a text formula
 
Col A B C D
OI 1,150 1,000 OI = 2150
DC 3,900 4,500 DC = 8400

I have the following info in the first 3 columns then in the column D I have
the formula =A2&" = "&(b2+c2) which gives me the item being displayed as
above. I am using it for text boxes in a chart so I need to show the item in
D to read:

OI = 2,150
DC = 8,400

Is there a way I can apply formats to a formula or would I have to go:
use concantenate & truncate to put the commas in the correct places?


Rick Rothstein

format a number appearing in a text formula
 
Use the TEXT function to create the format...

=A5& "= "&TEXT(B5+C5,"#,###")

--
Rick (MVP - Excel)


"ogerriz" wrote in message
...
Col A B C D
OI 1,150 1,000 OI = 2150
DC 3,900 4,500 DC = 8400

I have the following info in the first 3 columns then in the column D I
have
the formula =A2&" = "&(b2+c2) which gives me the item being displayed
as
above. I am using it for text boxes in a chart so I need to show the item
in
D to read:

OI = 2,150
DC = 8,400

Is there a way I can apply formats to a formula or would I have to go:
use concantenate & truncate to put the commas in the correct places?



Jacob Skaria

format a number appearing in a text formula
 
Formula in D2

=A2& " = "&TEXT(B2+C2,"0,0")

If this post helps click Yes
---------------
Jacob Skaria


"ogerriz" wrote:

Col A B C D
OI 1,150 1,000 OI = 2150
DC 3,900 4,500 DC = 8400

I have the following info in the first 3 columns then in the column D I have
the formula =A2&" = "&(b2+c2) which gives me the item being displayed as
above. I am using it for text boxes in a chart so I need to show the item in
D to read:

OI = 2,150
DC = 8,400

Is there a way I can apply formats to a formula or would I have to go:
use concantenate & truncate to put the commas in the correct places?



All times are GMT +1. The time now is 08:49 PM.

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