mergefield formatting

M

Malcolm

Hi

I have a document that has mergefields that use this
formatting \#"#,##0.00 to format the numerical value being
shown.

My problem is that I would like to show a £ sign at the
front of the figure. I can pu this in mamually which
works to a degree but not quite right. If the numerical
figure is 500, the output on the document is £500.00 which
is perfect. If however the numerical figure is 1, the
output on the document is £ 1.00. Note the 2 character
space between the currency sign and the number 1.

Is there a way to ensure that the £ sign will move to the
imediate left of the first number of any numerical value
being merged into the document?

Many thanks

Malcolm Davidson
 
D

Doug Robbins - Word MVP

Hi Malcolm,

Use the following formatting switch:

\# "£,#.00"

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
Hi

I have a document that has mergefields that use this
formatting \#"#,##0.00 to format the numerical value being
shown.

My problem is that I would like to show a £ sign at the
front of the figure. I can pu this in mamually which
works to a degree but not quite right. If the numerical
figure is 500, the output on the document is £500.00 which
is perfect. If however the numerical figure is 1, the
output on the document is £ 1.00. Note the 2 character
space between the currency sign and the number 1.

Is there a way to ensure that the £ sign will move to the
imediate left of the first number of any numerical value
being merged into the document?

Many thanks

Malcolm Davidson
 
S

Suzanne S. Barnhill

But you can't get the thousands separator that way.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://www.mvps.org/word
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
C

Cindy Meister -WordMVP-

Hi Suzanne,
But you can't get the thousands separator that way.
That includes the thousands separator - it's the comma. Try
it :)

Cindy Meister
 
C

Cindy Meister -WordMVP-

Hi Suzanne,

I think you ought to remove \* Mergeformat; I doubt that has anything to do
with the particular problem, but it could lead to other, unexpected
formatting issues.

What happens if you
1) Use quotes around the numeric picture: "-$,#.00"
2) Delete the space before the =
But here's another riddle for you: I've got this field:

{ = SUM(ABOVE) \# -$,#.00 \* MERGEFORMAT }

Even if I remove every single space from the field (amazingly, it still
operates as expected), I can't get rid of a leading space before the dollar
sign in the field result.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jan 24 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
S

Suzanne S. Barnhill

I think you ought to remove \* Mergeformat; I doubt that has anything to
do
with the particular problem, but it could lead to other, unexpected
formatting issues.

Tried that, too. Made no difference. FWIW, I've never had any problems that
seemed to be related to that switch.
What happens if you
1) Use quotes around the numeric picture: "-$,#.00"

No difference.
2) Delete the space before the =

Already did that; that would be included in "remove[d] every single space
from the field."

The only reason this is an issue is that I have the column formatted for the
sort of numbers I usually have (rarely exceeding $999). But on the rare
occasions when the number goes to four figures, the space is just enough to
make the number wrap to the next line. Naturally, I can drag the column a
hair wider, but I was just wondering if there was some way to format the
field to avoid this.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://www.mvps.org/word
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
C

Cindy Meister -WordMVP-

Hi Suzanne,

Any particular reason for the - (minus). That's being displayed as a space,
when I test. If you actually want to display the minus, put it in 'single
quotes'. Otherwise, delete it.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jan 24 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
S

Suzanne S. Barnhill

I believe the minus is to allow for negative numbers. Sometimes clients have
a credit balance. I set this template up so long ago that I don't really
remember.

But you're evidently right about this being the cause of the space; Word's
Help on numeric picture switches says:

- (minus sign)
Adds a minus sign to a negative result, or adds a space if the result is
positive or 0 (zero). For example, { = 10 - 90 \# -## } displays "-80".

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://www.mvps.org/word
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
C

Cindy Meister -WordMVP-

Hi Suzanne,

Ah? Yes, that would help align numbers in a column. Been so long since I
looked at the help for these things...

The better way to define formatting for a minus amount is to add an
additional part to the number format:

\# "$,#.00,'-'$,#.00"

Note, however, that this is unlikely to work correctly on a default US
system because the comma as the thousands separator is going to interfere
with the comma as a list separator. If you want to do this, you should
change the list separator in the Control Panel (; is good), but don't forget
this is going to affect ALL your fields that have list arguments.
But you're evidently right about this being the cause of the space; Word's
Help on numeric picture switches says:

- (minus sign)
Adds a minus sign to a negative result, or adds a space if the result is
positive or 0 (zero). For example, { = 10 - 90 \# -## } displays "-80".

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jan 24 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
S

Suzanne S. Barnhill

I hadn't thought about the space being for alignment purposes since I always
have such numbers decimal-aligned anyway. <sigh>

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://www.mvps.org/word
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
C

Cindy Meister -WordMVP-

Hi Suzanne,
I hadn't thought about the space being for alignment purposes since I always
have such numbers decimal-aligned anyway.
Ah, but decimal aligning wouldn't align the $-signs :)

-- Cindy
 
S

Suzanne S. Barnhill

But I never use dollar signs on the line items, so it's not an issue.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://www.mvps.org/word
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

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