View Single Post
  #4   Report Post  
Posted to microsoft.public.word.docmanagement
macropod macropod is offline
external usenet poster
 
Posts: 1,002
Default Text Form Field Calculation

Hi John,

My last post only works if 0s aren't valid values. If a '0' value is a valid value, you can use a composite of the previous two
posts, coded along the lines of:

{=SUM({=Field1},{=Field2},{=Field3},{=Field4},{=Fi eld5},{=Field6},{=Field7},{=Field8},{=Field9},{=Fi eld10})/
({IF{Field1}= " " 0 1}+{IF{Field2}= " " 0 1}+
{IF{Field3}= " " 0 1}+{IF{Field4}= " " 0 1}+
{IF{Field5}= " " 0 1}+{IF{Field6}= " " 0 1}+
{IF{Field7}= " " 0 1}+{IF{Field8}= " " 0 1}+
{IF{Field9}= " " 0 1}+{IF{Field10}= " " 0 1})}

Cheers

--
macropod
[MVP - Microsoft Word]


"JohnS" wrote in message ...
| I've got 10 Text Form Fields that are all named. I want to average the
| numbers that are entered into those fields. The only problem is that not all
| fields are used every time. I've tried this two ways and neither seems to
| work.
|
| The first is "=average(field1, field2, etc.)". This only works if all
| fields are used.
|
| The second way is to sum the results of the fields, then divide that by a
| count of the fields in use. To get the count of the fields in use I used a
| separate field for each that calculates "=(if, field11,1,0)", then I sum all
| those up to get the number. I can get the sum and the count to work, but
| when I divide the sum by the count it doesn't work.
|
| Any ideas?