Brian Barker,

Wow!

You know Calc.

So cool.

How did you pick this up?!  It is not in the obvious help file.

Thank you!
jg


----- Original Message ----- From: "Brian Barker" <[EMAIL PROTECTED]>
To: <users@openoffice.org>
Sent: Sunday, October 21, 2007 1:19 AM
Subject: Re: [users] Please. How do I format in Calc?


At 00:23 21/10/2007 -0500, John Gilchrist wrote:
Here is the expression I am using:
=CONCATENATE("K=1/n= ";

Here is the result I get:
      K=1/n= .117924528301887

Here is the result that I want:
K=1/n= 11.79%

1.  How do I format this in Calc?

2. Also, how can I begin to use a format code notation ##.## which I found in the help file?
I cannot find any help file example.

To answer your second question first, you can use the format codes in the "Format code" box on the Numbers tab of the Format Cells dialogue. But you can also use them in the TEXT function, which allows you to convert a number explicitly to a text string.

In fact, the answer you are getting here is right, of course: 0.1179 *is* 11.79%: it's just not formatted as you wish. You may be getting confused by the fact that if you want a percentage displayed in a number cell, you do it by formatting the cell. This means that if you see "11.79%" in your cell M6 (and if you've arranged this the normal way by applying a percent format to the cell), what is actually there is still .1179... . To get the actual percentage displayed, we have to multiply this number by 100, of course.

Try this:
   =CONCATENATE("K=1/n= ";TEXT('Daily Summary'.M6*100;"##.##");"%")

If you want a consistent number of fractional places, even where they may be zeroes, you may prefer to use a format such as "##.00". And note that the "&" operator is a generally easier alternative to the CONCATENATE function for expressing concatenations. So you may want to try something like:
   ="K=1/n= "&TEXT('Daily Summary'.M6*100;"##.00")&"%"

Another way to approach this is to put all the accompanying text into the cell format instead of into the cell as text. To do this, put:
   ='Daily Summary'.M6
into the cell itself, so you just have the original value there (a number), and
   "K=1/n= "##.00%
into the "Format code" box on the Numbers tab of the Format Cells dialogue.

I trust this helps.

Brian Barker

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
No virus found in this incoming message.
Checked by AVG Free Edition. Version: 7.5.488 / Virus Database: 269.15.3/1082 - Release Date: 10/20/2007 2:59 PM


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to