A Microsoft Word forum. Microsoft Office Word Forum - WordBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Microsoft Office Word Forum - WordBanter forum » Microsoft Word Newsgroups » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

mail merge w/ excel and conditions



 
 
Thread Tools Display Modes
  #1  
Old January 2nd 09, 09:24 PM posted to microsoft.public.word.mailmerge.fields
Ahmayzin1
external usenet poster
 
Posts: 1
Default mail merge w/ excel and conditions

Using word format for report; using excel ss for data. Have several
divisions which are not standard. Merge of data to semi-standard is not
problem....getting the numbers formatted is....want to put conditional format
in word.

If number from merge field is smaller than 1 format as percent (no
decimals), if not format as a whole number with commas

sounds simple...but I have spent four full days playing with ifs and {}
help!!!

thanks
Ads
  #2  
Old January 2nd 09, 10:08 PM posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
external usenet poster
 
Posts: 4,583
Default mail merge w/ excel and conditions

Can you clarify what you mean he

smaller than 1 format as percent (no decimals)


?

e.g.
a. can the number be negative? What then?
b. If the number is .675 do you want 67% or 68% (i.e. standard rounding)
c. if the number is (say) 1000.77 do you want rounding (1,001) or the
integer part only (1,000)?

Taking a few guesses, something along the following lines should do the
trick, where all the {} are the special field braces you can insert
using ctrl-F9:

{ IF { ={ MERGEFIELD mynumber }-1 } = 0 "{ =int({ MERGEFIELD mynumber
}) \#,0 }" "{ { MERGEFIELD }*100 \#0% }" }


Peter Jamieson

http://tips.pjmsn.me.uk

Ahmayzin1 wrote:
Using word format for report; using excel ss for data. Have several
divisions which are not standard. Merge of data to semi-standard is not
problem....getting the numbers formatted is....want to put conditional format
in word.

If number from merge field is smaller than 1 format as percent (no
decimals), if not format as a whole number with commas

sounds simple...but I have spent four full days playing with ifs and {}
help!!!

thanks

  #3  
Old January 3rd 09, 06:58 AM posted to microsoft.public.word.mailmerge.fields
macropod[_2_]
external usenet poster
 
Posts: 2,060
Default mail merge w/ excel and conditions

Hi Ahmayzin1,

Try:
{IF{MERGEFIELD Data} 1 {={MERGEFIELD Data}*100 \# "0%"} {MERGEFIELD Data \# ",0"}}
where 'Data' is your merfield name.

Note: The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you can't simply type them or copy & paste
them from this message.

--
Cheers
macropod
[MVP - Microsoft Word]


"Ahmayzin1" wrote in message ...
Using word format for report; using excel ss for data. Have several
divisions which are not standard. Merge of data to semi-standard is not
problem....getting the numbers formatted is....want to put conditional format
in word.

If number from merge field is smaller than 1 format as percent (no
decimals), if not format as a whole number with commas

sounds simple...but I have spent four full days playing with ifs and {}
help!!!

thanks


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Word Mail Merge from Excel -- Force Excel to open the datafile? [email protected] Mailmerge 6 September 26th 08 03:08 PM
ExcelWord Mail merge transfers 16 digits when Excel shows only 3 John Richmond, Watford UK Mailmerge 8 April 26th 06 06:00 AM
mail merge from excel-date in excel January 1, 2005 -merged dbase. Elaine Ballon Mailmerge 1 December 23rd 05 09:31 AM
Multiple conditions in merge Stephen Green Mailmerge 12 December 20th 05 07:38 PM
Filtering does not work from Excel - changed conditions by random Gunder Mailmerge 1 March 22nd 05 10:01 PM


All times are GMT +1. The time now is 06:19 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2004-2018 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.