Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / May 2007

Tip: Looking for answers? Try searching our database.

Currency Formatting - Word 2000

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris Stammers - 10 May 2007 17:49 GMT
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
Doug Robbins - Word MVP - 10 May 2007 19:19 GMT
Multiply it by 100

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

Signature

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

>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
[quoted text clipped - 14 lines]
> Thanks,
> Chris
Peter Jamieson - 10 May 2007 19:27 GMT
Try

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

Peter Jamieson
>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
[quoted text clipped - 14 lines]
> Thanks,
> Chris
Chris Stammers - 12 May 2007 15:42 GMT
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

> Try
>
[quoted text clipped - 20 lines]
> > Thanks,
> > Chris
Peter Jamieson - 12 May 2007 17:29 GMT
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

> Hello again,
>
[quoted text clipped - 44 lines]
>> > Thanks,
>> > Chris
Graham Mayor - 13 May 2007 06:41 GMT
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.

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

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

> a. I've missed the closing quotes and field brace:
>
[quoted text clipped - 58 lines]
>>>> Thanks,
>>>> Chris
Peter Jamieson - 13 May 2007 11:02 GMT
Thanks for the reminder Graham.

Peter Jamieson

> Peter,
>
[quoted text clipped - 64 lines]
>>>>> Thanks,
>>>>> Chris
Chris Stammers - 12 May 2007 22:12 GMT
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

> Hello again,
>
[quoted text clipped - 35 lines]
> > > Thanks,
> > > Chris
Chris Stammers - 11 May 2007 09:01 GMT
Peter and Doug - Thank you.
Regards,
Chris

> 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
[quoted text clipped - 10 lines]
> Thanks,
> Chris

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.