Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
mj_bowen[_2_] mj_bowen[_2_] is offline
external usenet poster
 
Posts: 1
Default Using IF function for 5 variables

I am an infant school teacher who has recently stumbled upon the uses of mail
merge. I have limited knowledge of format switches and have found advice on
this forum very clear and useful.

I have looked at; Mail merge - Ask / If function posted on 5/5/2006 6:55 AM
PST

http://www.microsoft.com/communities...e34-4b0c-8aba-
2e17252d39bc&lang=en&cr=us&pt=&catlist=&dglist=&pt list=&exp=&sloc=en-us


The data I have merged results in either a four, three, two, or one digit
number appearing in the word doc. I have been trying to use the IF switch to
add letters before the resulting Mergefield number. For example,

1.If the number is 9 or less than 9 (ie, 9 8 7 6 5 4 3 2 1 0) then a U would
appear before the Mergefield number,eg, U9

2.If the number is between 99 and 10 (including 99 and 10) then a T U would
appear before the Mergefield number, eg, TU21

3.If the number is between 999 and 100 (including 999 and 100) then
H T U would appear before the Mergefield number, eg, HTU354

4.If, the number is between 9999 and 1000 (including 999 and 100) the Th H T
U would appear before the Mergefield number, eg,
Th H T U 3437

5. Finally, the Mergefield may sometimes not result in number being
displayed in the word doc, intead a symbol or a word. This symbol or word
will be displayed on its own - without any Th H T U, H T U, T U or U in front
of it.

I have included an example (probably a very crude one of where I am up to!

{ If Qn_1_Red_410=€U{MERGEFIELD Qn_1_Red_4}€œ €œ€}
I have been trying to use the IF function, and have managed to come up with
the above code, but am stumped further.

Any advice woud be warmly welcomed.

Matthew


 
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
using bookmarks as variables - help! oldstonebuddha Mailmerge 8 November 23rd 08 06:23 PM
variables in WORD shank New Users 1 April 21st 06 07:45 PM
Using variables in a document Bill Page Layout 5 February 3rd 05 12:06 AM
Variables question Alex Anderson New Users 2 January 5th 05 08:35 PM
Variables? LDanix Mailmerge 1 December 21st 04 08:54 AM


All times are GMT +1. The time now is 03:46 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"