Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Chris Stammers Chris Stammers is offline
external usenet poster
 
Posts: 46
Default Currency Formatting - Word 2000

I need to format a currency field to be £0.00 if greater than £1 and 00p if
less than £1 in the data source. The data source holds the data as 1.00 or
..50. I have created this query: {IF { MERGEFIELD } 1 "£{MERGEFIELD\#,0.00 }
"{ MERGEFIELD\#.00 }p" }

The query does work but where there is just .50, it shows in the merge doc
with a leading decimal point. My question is this - is there a formatting
switch to get rid of the decimal point in the case where it is just pence? I
have tried taking the decimal point away and the query stops working. I tried
susbtituting the hash sign for a '@' instead and that didn't work either. Any
suggestions?

Thanks,
Chris
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Currency Formatting - Word 2000

Multiply it by 100

{IF { MERGEFIELD } 1 "£{MERGEFIELD\#,0.00 }
"{ = { MERGEFIELD\#.00 }* 100 }p" }


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Chris Stammers" wrote in message
...
I need to format a currency field to be £0.00 if greater than £1 and 00p if
less than £1 in the data source. The data source holds the data as 1.00 or
.50. I have created this query: {IF { MERGEFIELD } 1
"£{MERGEFIELD\#,0.00 }
"{ MERGEFIELD\#.00 }p" }

The query does work but where there is just .50, it shows in the merge doc
with a leading decimal point. My question is this - is there a formatting
switch to get rid of the decimal point in the case where it is just pence?
I
have tried taking the decimal point away and the query stops working. I
tried
susbtituting the hash sign for a '@' instead and that didn't work either.
Any
suggestions?

Thanks,
Chris



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Currency Formatting - Word 2000

Try

{ IF { MERGEFIELD myamount } 0.995 "{ MERGEFIELD myamount \#£,0.00 }"
"{ ={ MERGEFIELD myamount } * 100 \#00p }

Peter Jamieson
"Chris Stammers" wrote in message
...
I need to format a currency field to be £0.00 if greater than £1 and 00p if
less than £1 in the data source. The data source holds the data as 1.00 or
.50. I have created this query: {IF { MERGEFIELD } 1
"£{MERGEFIELD\#,0.00 }
"{ MERGEFIELD\#.00 }p" }

The query does work but where there is just .50, it shows in the merge doc
with a leading decimal point. My question is this - is there a formatting
switch to get rid of the decimal point in the case where it is just pence?
I
have tried taking the decimal point away and the query stops working. I
tried
susbtituting the hash sign for a '@' instead and that didn't work either.
Any
suggestions?

Thanks,
Chris


  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Chris Stammers Chris Stammers is offline
external usenet poster
 
Posts: 46
Default Currency Formatting - Word 2000

Peter and Doug - Thank you.
Regards,
Chris

"Chris Stammers" wrote:

I need to format a currency field to be £0.00 if greater than £1 and 00p if
less than £1 in the data source. The data source holds the data as 1.00 or
.50. I have created this query: {IF { MERGEFIELD } 1 "£{MERGEFIELD\#,0.00 }
"{ MERGEFIELD\#.00 }p" }

The query does work but where there is just .50, it shows in the merge doc
with a leading decimal point. My question is this - is there a formatting
switch to get rid of the decimal point in the case where it is just pence? I
have tried taking the decimal point away and the query stops working. I tried
susbtituting the hash sign for a '@' instead and that didn't work either. Any
suggestions?

Thanks,
Chris

  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Chris Stammers Chris Stammers is offline
external usenet poster
 
Posts: 46
Default Currency Formatting - Word 2000

Hello again,

Thanks for this query. I have placed it into 2 documents. It works in one
place in one document. However it seems that when the query is converting to
pence, only part of the paragraph it is part of will generate. The pound
formatting works fine.

However, the other document I have placed it in doesn't work at all if that
query is placed in it; all I get is 'Field Calculation Error in Record 1' etc.

Any ideas?

Thanks,
Chris


"Peter Jamieson" wrote:

Try

{ IF { MERGEFIELD myamount } 0.995 "{ MERGEFIELD myamount \#£,0.00 }"
"{ ={ MERGEFIELD myamount } * 100 \#00p }

Peter Jamieson
"Chris Stammers" wrote in message
...
I need to format a currency field to be £0.00 if greater than £1 and 00p if
less than £1 in the data source. The data source holds the data as 1.00 or
.50. I have created this query: {IF { MERGEFIELD } 1
"£{MERGEFIELD\#,0.00 }
"{ MERGEFIELD\#.00 }p" }

The query does work but where there is just .50, it shows in the merge doc
with a leading decimal point. My question is this - is there a formatting
switch to get rid of the decimal point in the case where it is just pence?
I
have tried taking the decimal point away and the query stops working. I
tried
susbtituting the hash sign for a '@' instead and that didn't work either.
Any
suggestions?

Thanks,
Chris





  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Currency Formatting - Word 2000

a. I've missed the closing quotes and field brace:

b. It may need quotes around the format, i.e.

{ IF { MERGEFIELD myamount } 0.995 "{ MERGEFIELD myamount \#"£,0.00" }"
"{ ={ MERGEFIELD myamount } * 100 \#"00p" }" }

If you still have trouble I suppose I would try the following next

{ IF { MERGEFIELD myamount } 0.995 "{ MERGEFIELD myamount \#"£,0.00" }"
"{ ={ MERGEFIELD myamount } * 100 \#"00" }p" }

Peter Jamieson


"Chris Stammers" wrote in message
...
Hello again,

Thanks for this query. I have placed it into 2 documents. It works in one
place in one document. However it seems that when the query is converting
to
pence, only part of the paragraph it is part of will generate. The pound
formatting works fine.

However, the other document I have placed it in doesn't work at all if
that
query is placed in it; all I get is 'Field Calculation Error in Record 1'
etc.

Any ideas?

Thanks,
Chris


"Peter Jamieson" wrote:

Try

{ IF { MERGEFIELD myamount } 0.995 "{ MERGEFIELD myamount \#£,0.00 }"
"{ ={ MERGEFIELD myamount } * 100 \#00p }

Peter Jamieson
"Chris Stammers" wrote in
message
...
I need to format a currency field to be £0.00 if greater than £1 and 00p
if
less than £1 in the data source. The data source holds the data as 1.00
or
.50. I have created this query: {IF { MERGEFIELD } 1
"£{MERGEFIELD\#,0.00 }
"{ MERGEFIELD\#.00 }p" }

The query does work but where there is just .50, it shows in the merge
doc
with a leading decimal point. My question is this - is there a
formatting
switch to get rid of the decimal point in the case where it is just
pence?
I
have tried taking the decimal point away and the query stops working. I
tried
susbtituting the hash sign for a '@' instead and that didn't work
either.
Any
suggestions?

Thanks,
Chris




  #7   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Chris Stammers Chris Stammers is offline
external usenet poster
 
Posts: 46
Default Currency Formatting - Word 2000

Peter,

Many thanks. I have tried both of those options with a basic merge using a
dummy file and both seemed to work fine. I will try with the offending
documents on Monday and see what happens.
Regards,
Chris

"Chris Stammers" wrote:

Hello again,

Thanks for this query. I have placed it into 2 documents. It works in one
place in one document. However it seems that when the query is converting to
pence, only part of the paragraph it is part of will generate. The pound
formatting works fine.

However, the other document I have placed it in doesn't work at all if that
query is placed in it; all I get is 'Field Calculation Error in Record 1' etc.

Any ideas?

Thanks,
Chris


"Peter Jamieson" wrote:

Try

{ IF { MERGEFIELD myamount } 0.995 "{ MERGEFIELD myamount \#£,0.00 }"
"{ ={ MERGEFIELD myamount } * 100 \#00p }

Peter Jamieson
"Chris Stammers" wrote in message
...
I need to format a currency field to be £0.00 if greater than £1 and 00p if
less than £1 in the data source. The data source holds the data as 1.00 or
.50. I have created this query: {IF { MERGEFIELD } 1
"£{MERGEFIELD\#,0.00 }
"{ MERGEFIELD\#.00 }p" }

The query does work but where there is just .50, it shows in the merge doc
with a leading decimal point. My question is this - is there a formatting
switch to get rid of the decimal point in the case where it is just pence?
I
have tried taking the decimal point away and the query stops working. I
tried
susbtituting the hash sign for a '@' instead and that didn't work either.
Any
suggestions?

Thanks,
Chris



  #8   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Currency Formatting - Word 2000

Peter,

You may find the macro at http://www.gmayor.com/export_field.htm useful as
it exports the fields intact to a text string which can be pasted into a NG
message, thus avoiding such typos.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Peter Jamieson wrote:
a. I've missed the closing quotes and field brace:

b. It may need quotes around the format, i.e.

{ IF { MERGEFIELD myamount } 0.995 "{ MERGEFIELD myamount
\#"£,0.00" }" "{ ={ MERGEFIELD myamount } * 100 \#"00p" }" }

If you still have trouble I suppose I would try the following next

{ IF { MERGEFIELD myamount } 0.995 "{ MERGEFIELD myamount
\#"£,0.00" }" "{ ={ MERGEFIELD myamount } * 100 \#"00" }p" }

Peter Jamieson


"Chris Stammers" wrote in
message ...
Hello again,

Thanks for this query. I have placed it into 2 documents. It works
in one place in one document. However it seems that when the query
is converting to
pence, only part of the paragraph it is part of will generate. The
pound formatting works fine.

However, the other document I have placed it in doesn't work at all
if that
query is placed in it; all I get is 'Field Calculation Error in
Record 1' etc.

Any ideas?

Thanks,
Chris


"Peter Jamieson" wrote:

Try

{ IF { MERGEFIELD myamount } 0.995 "{ MERGEFIELD myamount
\#£,0.00 }" "{ ={ MERGEFIELD myamount } * 100 \#00p }

Peter Jamieson
"Chris Stammers" wrote in
message
...
I need to format a currency field to be £0.00 if greater than £1
and 00p if
less than £1 in the data source. The data source holds the data as
1.00 or
.50. I have created this query: {IF { MERGEFIELD } 1
"£{MERGEFIELD\#,0.00 }
"{ MERGEFIELD\#.00 }p" }

The query does work but where there is just .50, it shows in the
merge doc
with a leading decimal point. My question is this - is there a
formatting
switch to get rid of the decimal point in the case where it is just
pence?
I
have tried taking the decimal point away and the query stops
working. I tried
susbtituting the hash sign for a '@' instead and that didn't work
either.
Any
suggestions?

Thanks,
Chris



  #9   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Currency Formatting - Word 2000

Thanks for the reminder Graham.

Peter Jamieson

"Graham Mayor" wrote in message
...
Peter,

You may find the macro at http://www.gmayor.com/export_field.htm useful as
it exports the fields intact to a text string which can be pasted into a
NG message, thus avoiding such typos.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Peter Jamieson wrote:
a. I've missed the closing quotes and field brace:

b. It may need quotes around the format, i.e.

{ IF { MERGEFIELD myamount } 0.995 "{ MERGEFIELD myamount
\#"£,0.00" }" "{ ={ MERGEFIELD myamount } * 100 \#"00p" }" }

If you still have trouble I suppose I would try the following next

{ IF { MERGEFIELD myamount } 0.995 "{ MERGEFIELD myamount
\#"£,0.00" }" "{ ={ MERGEFIELD myamount } * 100 \#"00" }p" }

Peter Jamieson


"Chris Stammers" wrote in
message ...
Hello again,

Thanks for this query. I have placed it into 2 documents. It works
in one place in one document. However it seems that when the query
is converting to
pence, only part of the paragraph it is part of will generate. The
pound formatting works fine.

However, the other document I have placed it in doesn't work at all
if that
query is placed in it; all I get is 'Field Calculation Error in
Record 1' etc.

Any ideas?

Thanks,
Chris


"Peter Jamieson" wrote:

Try

{ IF { MERGEFIELD myamount } 0.995 "{ MERGEFIELD myamount
\#£,0.00 }" "{ ={ MERGEFIELD myamount } * 100 \#00p }

Peter Jamieson
"Chris Stammers" wrote in
message
...
I need to format a currency field to be £0.00 if greater than £1
and 00p if
less than £1 in the data source. The data source holds the data as
1.00 or
.50. I have created this query: {IF { MERGEFIELD } 1
"£{MERGEFIELD\#,0.00 }
"{ MERGEFIELD\#.00 }p" }

The query does work but where there is just .50, it shows in the
merge doc
with a leading decimal point. My question is this - is there a
formatting
switch to get rid of the decimal point in the case where it is just
pence?
I
have tried taking the decimal point away and the query stops
working. I tried
susbtituting the hash sign for a '@' instead and that didn't work
either.
Any
suggestions?

Thanks,
Chris




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Formatting for Currency Louisq Microsoft Word Help 2 July 14th 06 04:58 PM
How do I to set numbers to currency in table formatting? MM Tables 1 May 31st 06 11:55 PM
Getting currency formatting to fill in final 0 Cindy B Mailmerge 2 February 21st 06 07:25 PM
Currency formatting MarkN Microsoft Word Help 7 January 19th 06 09:56 AM
Currency fields in Access lose th currency format whn merged why PMasters Mailmerge 1 June 1st 05 08:13 PM


All times are GMT +1. The time now is 06:54 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"