Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
I have a form field that needs to be rounded, but it is not a calculating
form field, it is the field used in the calculation of another form field. Is there a way to do this? Jerye |
#2
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
As far as I know, you cannot actually round numbers in a display field, but
you can specify a number format so that Word drops digits that you don't want to show (for example, all decimals but the first two). -- Stefan Blom Microsoft Word MVP "Jerye" wrote in message ... I have a form field that needs to be rounded, but it is not a calculating form field, it is the field used in the calculation of another form field. Is there a way to do this? Jerye |
#3
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Hi Jerye,
You can make a formfield round a number to various levels of precision. If you set the formfield's 'type' property to 'number' you then get the option to set the precision. That's the precision level the formfield will store, regardless of what's input. If you need to use a rounded version of that in another formula, you could use a formula field coded as: .. {=ROUND(Text1,-2)} to round the text formfield's value off to the nearest 100 .. {=ROUND(Text1,0)} to round the text formfield's value off to the nearest whole number .. {=ROUND(Text1,2)} to round the text formfield's value off to the nearest 1/100 etc, where 'Text1' is the formfield's bookmark name. -- Cheers macropod [Microsoft MVP - Word] "Jerye" wrote in message ... I have a form field that needs to be rounded, but it is not a calculating form field, it is the field used in the calculation of another form field. Is there a way to do this? Jerye |
#4
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
I believe it's been established that Word does actually round numbers when
you set a specific number of digits to display. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message ... As far as I know, you cannot actually round numbers in a display field, but you can specify a number format so that Word drops digits that you don't want to show (for example, all decimals but the first two). -- Stefan Blom Microsoft Word MVP "Jerye" wrote in message ... I have a form field that needs to be rounded, but it is not a calculating form field, it is the field used in the calculation of another form field. Is there a way to do this? Jerye |
#5
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
When I test this (text form field of type "Number," with the format set to
"0.00,"), Word doesn't seem to round the number correctly, if I add excessive decimals. -- Stefan Blom Microsoft Word MVP "Suzanne S. Barnhill" wrote in message ... I believe it's been established that Word does actually round numbers when you set a specific number of digits to display. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message ... As far as I know, you cannot actually round numbers in a display field, but you can specify a number format so that Word drops digits that you don't want to show (for example, all decimals but the first two). -- Stefan Blom Microsoft Word MVP "Jerye" wrote in message ... I have a form field that needs to be rounded, but it is not a calculating form field, it is the field used in the calculation of another form field. Is there a way to do this? Jerye |
#6
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
I guess I'm remembering wrong, then.
-- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message ... When I test this (text form field of type "Number," with the format set to "0.00,"), Word doesn't seem to round the number correctly, if I add excessive decimals. -- Stefan Blom Microsoft Word MVP "Suzanne S. Barnhill" wrote in message ... I believe it's been established that Word does actually round numbers when you set a specific number of digits to display. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Stefan Blom" wrote in message ... As far as I know, you cannot actually round numbers in a display field, but you can specify a number format so that Word drops digits that you don't want to show (for example, all decimals but the first two). -- Stefan Blom Microsoft Word MVP "Jerye" wrote in message ... I have a form field that needs to be rounded, but it is not a calculating form field, it is the field used in the calculation of another form field. Is there a way to do this? Jerye |
#7
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
What I am needing is to be able type in 14.9 and it will round to 15 or 14.3
and it will round to 14. Word always rounds down, no matter what. This is not a calulating form field, so I can't put in a formula. Jerye "Jerye" wrote: I have a form field that needs to be rounded, but it is not a calculating form field, it is the field used in the calculation of another form field. Is there a way to do this? Jerye |
#8
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Hi jerye,
You can only achieve what you're after with vba. You could for example, use code like: Option Explicit Dim FfName As String Sub GetFF() FfName = Selection.Bookmarks(1).Name End Sub Sub RoundIt() ActiveDocument.FormFields(FfName).Result = Round(ActiveDocument.FormFields(FfName).Result, 0) End Sub in a normal code module and make 'GetFF' the 'On Entry' macro and 'RoundIt' the 'On Exit' for the formfield, which must also have a bookmark name. If the formfield is formatted as text, you'll get a result equal to the rounded number, with no decimals. If the formfield is formatted as number, you'll need to have at least one decimal, and the returned result will be the whole number plus '.0' (or however many decimals you're using). Note: If the formfield you're dealing with is the first in the document, you'll also need to use code like the following in the document's 'This Document' module: Option Explicit Private Sub Document_Open() Call GetFF End Sub -- Cheers macropod [Microsoft MVP - Word] "Jerye" wrote in message ... What I am needing is to be able type in 14.9 and it will round to 15 or 14.3 and it will round to 14. Word always rounds down, no matter what. This is not a calulating form field, so I can't put in a formula. Jerye "Jerye" wrote: I have a form field that needs to be rounded, but it is not a calculating form field, it is the field used in the calculation of another form field. Is there a way to do this? Jerye |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Round Down Merge field | Mailmerge | |||
Round a form field within a table | Microsoft Word Help | |||
Calculating the previous month in a date field | Microsoft Word Help | |||
Number-only field allows "t" and "h"?! | Tables | |||
form field,can I add a telephone number under the number field w/d | Microsoft Word Help |