At 10:04 20/03/2009 -0700, John Meyer wrote:
Is there any way in a Writer document to set up a field based on the
results of a formula involving statistics. For instance, if I
wanted to display the number of paragraphs divided by 2?
Yes. There are two parts to this problem: inserting the number of
paragraphs, and halving it.
Inserting the number of paragraphs:
o Go to Insert | Fields > | Other... | Document.
o Under Type, select Statistics, and under Select select Paragraphs.
o Click Insert.
Halving this number:
o Create a suitable table - perhaps just one row and a number of columns.
o Insert the number of paragraphs (as above) in one cell by itself.
o In another cell, type an equals sign and then construct your
formula as you would in a spreadsheet. Click in the cell containing
the number of paragraphs to obtain a reference to it and/or type in
the input line. You may end up with something like =<A1>/2 .
There are various ways to hide the original field so that it does not
appear in the final document, but the simplest is probably to set the
text colour of the field to be white.
If you need other text on the same line, you could put it in other
cells of the table. You will probably want to choose the table to
have no borders. Note that field will not be updated every time you
create a new paragraph: you will need to use Tools | Update > |
Fields (or F9) to stimulate this.
I trust this helps.
Brian Barker
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]