Keeping Fractions as Fractions and doing Math

R

Rothrock

I'm doing a catalog with Excel, Word, and InDesign. Tracking all the
products and their info in Excel, merging through Word and into
InDesign.

I have the measurements all in Excel and are showing nicely as
fractions. I was hoping to keep them as fractions, but when I merge
into Word they revert to decimals. Does anybody know how to keep them
as fractions?

I could treat them as text in Excel, but I also need to convert them
all to centimeters as well. So I kind of need to keep them as numbers
as well.

Any help would be very appreciated.
 
J

JE McGimpsey

Rothrock said:
I'm doing a catalog with Excel, Word, and InDesign. Tracking all the
products and their info in Excel, merging through Word and into
InDesign.

I have the measurements all in Excel and are showing nicely as
fractions. I was hoping to keep them as fractions, but when I merge
into Word they revert to decimals. Does anybody know how to keep them
as fractions?

I could treat them as text in Excel, but I also need to convert them
all to centimeters as well. So I kind of need to keep them as numbers
as well.

Any help would be very appreciated.

How are you importing them?

If you're using data merge, use a numeric picture field switch in the
merge field (see the Word Help topic "Numeric Picture (\#) field switch")
 
R

Rothrock

I am using a data merge. Where do they come up with these names?
"Numeric Picture field Switch"?

Anyways I couldn't find the "fraction picture." I saw in the help how
to convert fractions to decimal. Will I need to do some complicated
math - I'm very capable of doing the math, once I figure out how to
make Word do any math... :)

I also thought it would help to use this for the conversion to
centimeters, but couldn't figure out how to make any of this work.

I start with this:

{ MERGEFILED Size }

If I want to multiply by 2.54, where do I put the calculation.

None of the examples I found in the help file show calculation with a
MERGEFIELD.

I guess that the real question is how do I get a set of curly braces
that actually tell work this is a field or calculation type thing and
not just some regular curly braces?
 
J

JE McGimpsey

Rothrock said:
I am using a data merge. Where do they come up with these names?
"Numeric Picture field Switch"?

Anyways I couldn't find the "fraction picture." I saw in the help how
to convert fractions to decimal. Will I need to do some complicated
math - I'm very capable of doing the math, once I figure out how to
make Word do any math... :)

Ah, pardon me, I obviously focused on doing the math rather than keeping
the displayed values as fractions.

Unfortunately, Word has no built-in way to convert values to fractions.

One workaround I've used is to use text formatting in XL. For instance,
if in Sheet1, you have

A B
1 Field1 Field2
2 Item A 1/2
3 Item B 3/5
4 Item C 5/9

etc., then in Sheet2, enter

A B
1 =Sheet1!A1 =Sheet1!B1
2 =Sheet1!A2 =TEXT(Sheet1!B2,"?/?")
....

copying A2:B2 down as far as required.

Then use Sheet 2 for your merge.

Another way would be to separate the numerator and denominator into
separate columns in the XL file.

Neither are ideal, obviously. An alternative that I've used once is to
merge the data, then use VBA to replace all the fraction merge fields
with text generated by the Format() function. That has its own drawbacks
of course: you can't update it from the source file without replacing
the merge field.
 
R

Rothrock

PS: Your TEXT solution reports the total as fractions so 5 1/2 becomes
11/2. Technically correct, but not quite what I'm looking for. I'm sure
there is a combination of #, ?, x, etc. that works. I'll see what I
come up with.
 
R

Rothrock

I did have a reply before the PS, but it seems to have vanished. Thanks
for the guidance as usual. I was hoping to learn something and I did.

For the part about curly braces...how do I get some curly braces that
Word recognizes as a command for the merge? Right now I'm dragging over
a mergfield and then deleting all the content. Seems rather silly way
to me.
 
R

Rothrock

Thank you. Very clear and on-the-point as always. I might just do a
search/replace thing as well. I think they are all just up to 1/4
increments so there aren't too many variations. I was just hoping to
learn something new, and I have.

As for that last part of my question? How do I get curly braces that
Word recognizes as part of a merge? Right now I drag over a merge field
and then delete all the content. Seems like a silly way to do it.
 

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