FORMULAS IN WORD TABLES

J

John Allmer

I am not a programer so please make it idiot proof.

I know word will accept an excell spread sheet, but then
the information must be put in the spead sheet to
recompute as the formulas do not copy accross so the data
can be changed in the WORD document. Help indicates
formulas can be made in a WORD table. How is this
accomplished?
 
D

Doug Robbins - Word MVP

Hi John,

You can insert an Excel Table in Word and then when you double click on that
table, you can use it just like and Excel spreadsheet.

Alternatively, when you have the cursor in the cell of the Word table in
which you want to create the formulat, select Formula from the Table menu.

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
M

macropod

Hi John,

In Word, you can insert a formula by pressing Ctrl-F9 to
create a field, then typing the formula between the braces
eg:
{=a1+b1}

In many cases, the syntax can be the same as for excel,
though all cell referencing in Word is absolute - without
the '$' you'd use in Excel. Relative referencing can be
implemented, but I'd suggest you stick with the std
absolute referencing until you've mastered Word formulae.

Word has some quirks when it comes to evaluating or
returning text and/or nul values. For example, if you want
a field that only evaluates b2-b1 if b2 is empty or has
any numeric value other than 0, you could use:
{=IF(b2=0,0,b2-b1)} or {=IF(b2,b2-b1,0)}
For a field that evaluates b2-b1 if b2 has any numeric
value including 0, you could use:
{=IF(COUNT(b4)=0,0,c3+b4)}

In each case, if you want to hide '0' results, you can put
a numeric switch like \# #;-#; before the final brace -
the final ';' tells Word not to display 0 results.

Note: If you change the font attributes of the numeric
switches (eg fore/back colour, bold, etc), the field
result will display with those attributes.

Things come unstuck using an Excel syntax in a Word table
if you want to have a nul result or evaluate a text
string. In Excel you'd use:
=IF(b2=0,"",b2-b1)
to return a nul result but, the equivalent field in Word:
{=IF(b2=0,"",b2-b1)}
produces a syntax error. You then need to resort to
constructs like:
{IF{=COUNT(b2)}= 0 "" {=(b2-b1)}}

Word tables can't evaluate text strings, including dates,
at all using cell references. The only way of doing so is
to bookmark the cell's contents (not the cell itself), and
then evaluate the bookmark, like:
{IF{BkMrk}= "True Text" "True Response" {=(b2-b1)}}

Note: If you change the font attributes of the true/false
responses (eg fore/back colour, bold, etc), the field
results will display with those attributes. This can be
combined with font attributes for numeric switches (see
above).

That should get you started.

Cheers
PS: Remove NO.SPAM from the above before replying.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top