Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.tables
|
|||
|
|||
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
Posted to microsoft.public.word.tables
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Word should catalog misspelled words to study. | Microsoft Word Help | |||
take yet another lesson from wordperfect "reveal codes" | Microsoft Word Help | |||
how do i set up template in vbeditor without proggramming language | New Users | |||
Envelope Address | New Users | |||
Macros - Keyboard Commands | Microsoft Word Help |