HELP W/ Merging Excel to Word

  • Thread starter Thread starter Jaclyn
  • Start date Start date
J

Jaclyn

Can someone give me some advice. Below is an example.
Here it goes: In column A, I have dates of when someone
started at a job(Aug 15, 2001); In column B, I have the
date when they left their job (January 5, 2003). In
Column C, I have a formula =(b1-a1)/365 And that way I
can get the number of years they worked in total. I've
changed the format so it wouldn't show the decimals.
I've even went as far as doing a formula so it wouldn't
show the decimals. But when I merge it to a Word
document it will show the decimals on Word when it
doesn't show it on Excel. Any Help? Any ideas? Thanks.
 
Hi Jaclyn!

How are you merging into Word?

From context, I assume you're happy with approximation of (B1-A1)/365
but I think that DATEDIF(A1,B1,"y") might be better.

I'm using:

A1:
15-Aug-2001
B1:
05-Jan-2003
C1:
=ROUND((B1-A1)/365,0)

Then I Select the three cells
Into Word:
Edit > Paste Special
Check Paste Link
Select Microsoft Excel Object
OK

Seems to work OK and with paste link updates as and when.


--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
Hi Norman,

I'm actually using Excel as a data source for merging
into Word. All the other information that I merge is
fine because I'm not using formulas for them. But if
there is a formula it will not merge with the
formatting. Is this ever possible?
 
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