Using Formulas in a Word Table

S

silentpro

I'm using word '07 & have a table in there that acts much like a roster of
people.

I would like to have checkboxes going down each column & at the bottom row
total the amount of ticked checkboxes.
I tried the formula =IF(C2:C36, "TRUE") & I get a syntax error.

I also would like the total the amount of peoples names in another column.
I tried =COUNTIF(B2:B36, "*")

Are these formulas not allowed in Word? I know they will work in Excel,
but I need to do this in a word doc.

Is there another way to do what I'm wanting to do?

Please help....
 
M

macropod

Hi silentpro,

Unfortunately, there's no way for a formula field in Word to test the state of a checkbox formfield (which I presume is what you are
using). You need to use vba for this. However, you could use a seies of dropdown formfields, where the user selects 1 or 0 and use a
formula field to do the calculations based on that.

Also, Word's supported range of formulae is nowhere near as rich as Excel's - you can't use SUMIF, for example - and the syntax is
different. To see how to do a wide range of other calculations in Word, check out my Word Field Maths Tutorial, at:
http://www.wopr.com/index.php?showtopic=365442
or
http://www.gmayor.com/downloads.htm#Third_party
 
S

silentpro

thanks for the link... lotta cool stuff in there.

Is there a work around for what I'm trying to do? I didn't see it in your
math file....

I would like to count the number of cells in a column that have text in it.
I would also like to count the number of "TRUE" (ticked) checkboxes. Then
reference those totals in another cell elsewhere on the sheet.



macropod said:
Hi silentpro,

Unfortunately, there's no way for a formula field in Word to test the
state of a checkbox formfield (which I presume is what you are using). You
need to use vba for this. However, you could use a seies of dropdown
formfields, where the user selects 1 or 0 and use a formula field to do
the calculations based on that.

Also, Word's supported range of formulae is nowhere near as rich as
Excel's - you can't use SUMIF, for example - and the syntax is different.
To see how to do a wide range of other calculations in Word, check out my
Word Field Maths Tutorial, at:
http://www.wopr.com/index.php?showtopic=365442
or
http://www.gmayor.com/downloads.htm#Third_party

--
Cheers
macropod
[MVP - Microsoft Word]


silentpro said:
I'm using word '07 & have a table in there that acts much like a roster
of people.

I would like to have checkboxes going down each column & at the bottom
row total the amount of ticked checkboxes.
I tried the formula =IF(C2:C36, "TRUE") & I get a syntax error.

I also would like the total the amount of peoples names in another
column.
I tried =COUNTIF(B2:B36, "*")

Are these formulas not allowed in Word? I know they will work in Excel,
but I need to do this in a word doc.

Is there another way to do what I'm wanting to do?

Please help....
 
M

macropod

Hi silentpro,

As I mentioned in my previous post, you could use a seies of dropdown formfields, where the user selects 1 or 0 and use a formula
field to do the calculations based on that. A suitable field code might look like:
{=SUM(C2:C36)}
or, if you're a masochist:
{={REF Dropdown1}+{REF Dropdown2}... +{REF Dropdown34}+{REF Dropdown35}}

Unfortunately, however, you can't use a formula field to count the cells containing the peoples' names unless there's a '1' (which
could be formatted as hidden text) and no other numbers in each of those cells - then you could use:
{=SUM(B2:B36)}

Note: The field brace pairs (ie '{ }') for the above examples are created via Ctrl-F9 - you can't simply type them or copy & paste
them from this message.

--
Cheers
macropod
[MVP - Microsoft Word]


silentpro said:
thanks for the link... lotta cool stuff in there.

Is there a work around for what I'm trying to do? I didn't see it in your math file....

I would like to count the number of cells in a column that have text in it. I would also like to count the number of "TRUE"
(ticked) checkboxes. Then reference those totals in another cell elsewhere on the sheet.



macropod said:
Hi silentpro,

Unfortunately, there's no way for a formula field in Word to test the state of a checkbox formfield (which I presume is what you
are using). You need to use vba for this. However, you could use a seies of dropdown formfields, where the user selects 1 or 0
and use a formula field to do the calculations based on that.

Also, Word's supported range of formulae is nowhere near as rich as Excel's - you can't use SUMIF, for example - and the syntax
is different. To see how to do a wide range of other calculations in Word, check out my Word Field Maths Tutorial, at:
http://www.wopr.com/index.php?showtopic=365442
or
http://www.gmayor.com/downloads.htm#Third_party

--
Cheers
macropod
[MVP - Microsoft Word]


silentpro said:
I'm using word '07 & have a table in there that acts much like a roster of people.

I would like to have checkboxes going down each column & at the bottom row total the amount of ticked checkboxes.
I tried the formula =IF(C2:C36, "TRUE") & I get a syntax error.

I also would like the total the amount of peoples names in another column.
I tried =COUNTIF(B2:B36, "*")

Are these formulas not allowed in Word? I know they will work in Excel, but I need to do this in a word doc.

Is there another way to do what I'm wanting to do?

Please help....
 

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