Truncating

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to use an Excel worksheet as the basis for a mail merge to Word. One of the fields that I am trying to use has a number in it that was computed (ie: one cell divided by another). When I pull that cell into the merge field in Word, it gives me 9+ digits to the right of the decimal. I have tried rounding, truncating, copying the entire column of rounded numbers over as values only. Even when Excel shows me no function in a cell and only a number such as 7.6, it pulls the number 7.599999 into Word.
 
Someone replied to a similar problem the other day. I
think the answer was to right-click on the field and add a
switch e.g [Cost}\"0.00"

Alternatively, you could round the function in excel
e.g +ROUND(cell1/Cell2,2) this round the answer to two
decimal places. If you are calculating money you should
always do this anyway.

Regards
Peter
-----Original Message-----
I am trying to use an Excel worksheet as the basis for a
mail merge to Word. One of the fields that I am trying to
use has a number in it that was computed (ie: one cell
divided by another). When I pull that cell into the merge
field in Word, it gives me 9+ digits to the right of the
decimal. I have tried rounding, truncating, copying the
entire column of rounded numbers over as values only.
Even when Excel shows me no function in a cell and only a
number such as 7.6, it pulls the number 7.599999 into Word.
 
I've run into the same problem. Rounding in Excel does not help. You have to
tell set the number of decimal places in Word.

--
Regards,
Fred
Please reply to newsgroup, not e-mail


Peter Atherton said:
Someone replied to a similar problem the other day. I
think the answer was to right-click on the field and add a
switch e.g [Cost}\"0.00"

Alternatively, you could round the function in excel
e.g +ROUND(cell1/Cell2,2) this round the answer to two
decimal places. If you are calculating money you should
always do this anyway.

Regards
Peter
-----Original Message-----
I am trying to use an Excel worksheet as the basis for a
mail merge to Word. One of the fields that I am trying to
use has a number in it that was computed (ie: one cell
divided by another). When I pull that cell into the merge
field in Word, it gives me 9+ digits to the right of the
decimal. I have tried rounding, truncating, copying the
entire column of rounded numbers over as values only.
Even when Excel shows me no function in a cell and only a
number such as 7.6, it pulls the number 7.599999 into Word.
 
In the Mail Merge, after you select your Excel file as a data source,
you should see a 'Confirm Data Source' dialog box. From that list,
choose 'MS Excel Worksheets via DDE (*.xls)', and your formatting will
be retained.

If you connect through a different source, you can format the fields in
the Word document. For example, to specify a number of decimals:

1. In Word, in the Main Document, press Alt+F9 to view the field codes.
2. Find the field code for the number. It will look something like:
{ MERGEFIELD FieldName }
3. Add a switch, to format the number with two decimal places.
For example:
{ MERGEFIELD FieldName \# "#,##0.00" }
4. Press Alt+F9 to hide the field codes.
5. Save the Main Document
 
Back
Top