Formula

M

Mark Lewis

Hi,

I'm trying to perform a calculation in a form

'Text1' multiply by 'Text2' Divided by 60?

Any help please?

Word help doesn't offer any assistant in calculations!

Thanks

Mark
 
G

Graham Mayor

Check the calculate on exit check box of Text2

Insert a form field and set its properties to 'calculated' and in the
calculation area enter

=(Text1 * Text2) / 60

OR

Insert a formula field (not a form field) at the location where you want the
result of the calculation to appear eg

{=({REF Text1} * {REF Text2}) / 60}

Use CTRL+F9 for each bracket pair {} (Note you will get an error if there is
no content in Text1 and Text2.)

OR

Run the following macro on exit from Text2 to write the result of the
calculation in form field Text4

Sub Calc1()
Dim oFld As FormFields
Set oFld = ActiveDocument.FormFields
oFld("Text4").Result = (oFld("Text1").Result * oFld("Text2").Result) /
60
End Sub

Uncheck the Fill in Enabled property of Text4

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
M

Microsmith

Hi Mark

One tool that works great for creating formulas in Word is "Formula Builder
for MS Word". You can find it at most major download sites.
 

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