#1
|
|||
|
|||
Text Form Field -Calculate Percentage
I crafted a new Word doc using the Text Form Field Options and tried to calculate a percentage from two number fields I created but the results would not include the decimal digits. I formatted the field to show 2 decimal digits, but the results were .00. To be clear, the calculation is 59,834 divided by 6,938, but the result rounds to 12.00% instead of 11.60%. Any insight? |
#2
|
||||
|
||||
Your document uses a formfield for the calculation; which is unnecessary and in some cases undesirable. If you unprotect the document, select the calculation formfield and press Shift-F9, you'll see:
{ FORMTEXT { =REDEMPTIONGROUP/OFFERGROUP }} What you need to do is copy '=REDEMPTIONGROUP/OFFERGROUP' and paste it over 'FORMTEXT ', then delete { =REDEMPTIONGROUP/OFFERGROUP }. Having done that, you should see: { =REDEMPTIONGROUP/OFFERGROUP } Edit this expression to show: { =REDEMPTIONGROUP/OFFERGROUP*100 \# "0.00%" } then re-apply your forms protection. You now have just a formula field for the calculation, instead of a formfield. To see how to a wide range of calculations in Word, check out my Microsoft Word Field Maths Tutorial, at: http://windowssecrets.com/forums/sho...Maths-Tutorial or: http://www.gmayor.com/downloads.htm#Third_party
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thank you for your reply. I was able to make the modifications per your suggestion and it worked!
|
#4
|
||||
|
||||
OK, here's another way:
1. Unprotect the document. 2. Delete the formula field in its entirety; 3. Press Cmd-F9 to create a pair of field braces, thus { } 4. Input the formula into the field, thus {=REDEMPTIONGROUP/OFFERGROUP*100 \# "0.00%"} 5. Re-apply the forms protection.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
This worked. Thanks again.
By the way, being a nubie to the MS Word forum, I am not sure how to mark this thread as being solved but I am good to go on this end. Thanks |
#6
|
||||
|
||||
There is an option for that on the 'Thread tools' dropdown, though I'm not sure how many posts on needs to have made before being able to access it. Marked as solved.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Macro to find text and replace with form field containing that text | iiiiifffff | Word VBA | 16 | 06-04-2016 01:47 AM |
How to calculate a rolling year-to-date percentage by quarter as the year progresses | sleake | Excel Programming | 2 | 04-23-2015 11:51 AM |
Macro to find coloured text and replace with form-field/formtext containing that text | tarktran | Word VBA | 1 | 11-26-2014 08:12 AM |
Form field selection allows entry into form text box | David C | Word | 1 | 10-24-2012 04:53 AM |
Form Fields - Create blank form text field with if statement? | LAssist2011 | Word | 5 | 12-14-2011 03:02 PM |