ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Formatting withing formula? (https://www.excelbanter.com/excel-programming/394437-formatting-withing-formula.html)

ppsa

Formatting withing formula?
 
Hello--

In a cell, I have a formula concatenated with text, like this:

="The analysis reveals that " & <formula goes here & "blah, blah, blah..."

As is, the number resulting from the formula has a ton of decimal places. I
need to control that so that it displays the way I want. In some cases that
will be with one or two decimal places, and in others with none, etc. It
doesn't seem to recognize the Format function that is recognized in VBA code.
Any suggestions?

Thanks.

Jim Thomlinson

Formatting withing formula?
 
The equivalent function to Format in Excel is Text(Value, "Format")

So something like this...
="The analysis reveals that " & Text(<formula goes here, "0.00") & "blah,
blah, blah..."
--
HTH...

Jim Thomlinson


"ppsa" wrote:

Hello--

In a cell, I have a formula concatenated with text, like this:

="The analysis reveals that " & <formula goes here & "blah, blah, blah..."

As is, the number resulting from the formula has a ton of decimal places. I
need to control that so that it displays the way I want. In some cases that
will be with one or two decimal places, and in others with none, etc. It
doesn't seem to recognize the Format function that is recognized in VBA code.
Any suggestions?

Thanks.


ppsa

Formatting withing formula?
 
Ah! That's it! Thank you!

"Jim Thomlinson" wrote:

The equivalent function to Format in Excel is Text(Value, "Format")

So something like this...
="The analysis reveals that " & Text(<formula goes here, "0.00") & "blah,
blah, blah..."
--
HTH...

Jim Thomlinson


"ppsa" wrote:

Hello--

In a cell, I have a formula concatenated with text, like this:

="The analysis reveals that " & <formula goes here & "blah, blah, blah..."

As is, the number resulting from the formula has a ton of decimal places. I
need to control that so that it displays the way I want. In some cases that
will be with one or two decimal places, and in others with none, etc. It
doesn't seem to recognize the Format function that is recognized in VBA code.
Any suggestions?

Thanks.



All times are GMT +1. The time now is 07:48 AM.

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