Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
D Atkins
 
Posts: n/a
Default Convert formula alpa to numeric in word 2003

I am creating an evaluation charge in word. I want people to fill out the
chart just by placing an "X" in the column. Then I want the chart to convert
the "X" to a numeric value and then take an average of all the conversion
numbers. I can get the formula to work in Excel but it will not work in Word.
=IF(B3="X",5,IF(C3="X",4,IF(D3="X",3,IF(E3="X",2,I F(F3="X",1,))))).
Is there a way to write a similar formula that works, have the participants
stay in word, and have the calculation performed?
  #2   Report Post  
Posted to microsoft.public.word.tables
Doug Robbins - Word MVP
 
Posts: n/a
Default Convert formula alpa to numeric in word 2003

I assume that you want the value you want to be displayed will appear in
column A. If that is the case, then I would insert a textbox type formfield
in the cells of the first column and a checkbox type formfield in each cell
in the second through the sixth columns of the table and in the formfield
properties dialog for each checkbox type formfield, set a macro containing
the following code to run on exit from the formfield and also check the
Calculate on Exit box for the formfield. When the document is protected for
forms, when the user checks a box in a row, the relevant numeric will appear
in the textbox type formfield in the first column and if you have a formula
to average those values, then it will display the average. If the user
checks one box in a row and then changes their mind, it would be better if
they unchecked that box before checking a different box in that row, but if
they do not, then they will get a message that they have checked more than
one box in the row and both checked boxes will be cleared.

Dim i As Long
Dim j As Long
Dim k As Long
Dim m As Long
Dim box As Range
Dim Flag As Boolean
i = Selection.Information(wdEndOfRangeRowNumber)
Flag = False
m = 0
With ActiveDocument.Tables(1).Rows(i)
For j = 2 To 6
Set box = .Cells(j).Range
If box.FormFields(1).result = 1 Then
If Flag = True Then
MsgBox "You have checked more than one box in this row."
For k = 1 To 6
.Cells(k).Range.FormFields(1).result = 0
Next k
Exit Sub
Else
Flag = True
.Cells(1).Range.FormFields(1).result = 7 - j
End If
Else
For k = 2 To 6
m = m + .Cells(k).Range.FormFields(1).result
Next k
If m = 0 Then
.Cells(1).Range.FormFields(1).result = 0
Flag = False
End If
End If
Next j
End With

You may also want to take a look at the article "Making groups of Check Box
Form Fields mutually exclusive (so that they behave like radio buttons)" at:

http://www.word.mvps.org/FAQs/TblsFl...FmFldChbxs.htm

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"D Atkins" wrote in message
news
I am creating an evaluation charge in word. I want people to fill out the
chart just by placing an "X" in the column. Then I want the chart to
convert
the "X" to a numeric value and then take an average of all the conversion
numbers. I can get the formula to work in Excel but it will not work in
Word.
=IF(B3="X",5,IF(C3="X",4,IF(D3="X",3,IF(E3="X",2,I F(F3="X",1,))))).
Is there a way to write a similar formula that works, have the
participants
stay in word, and have the calculation performed?


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word should catalog misspelled words to study. rndthought Microsoft Word Help 39 May 21st 23 02:47 AM
take yet another lesson from wordperfect "reveal codes" wordperfect is superior Microsoft Word Help 5 May 11th 09 07:58 PM
how do i set up template in vbeditor without proggramming language ARRRGH New Users 4 October 1st 05 03:19 AM
Envelope Address GR New Users 5 April 24th 05 09:48 PM
Macros - Keyboard Commands Janet Microsoft Word Help 6 April 11th 05 05:28 AM


All times are GMT +1. The time now is 03:41 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"