Reply
 
Thread Tools Display Modes
  #1   Report Post  
prkhan56
 
Posts: n/a
Default IF to Test a Value


Hello All,
I posted this yesterday but cannot see it in the group.. so posting the
problem again

I am using Windows XP/Office 2003 and have the following problem:

I have a MailMerge Document .. The data is in Excel

I wish to test the Fieldname 'CONT' shown at the top of the merge
document. The value will be from 1 to 5 and 'RATE' is shown in
five different places.

For Eg If CONT = 2

RATE in first and second place should show the value from the Excel
file, and should show blank in third, fourth and fifth place..
similarly if CONT = 4 . .. then the fifth RATE will be blank

I tried something like this for CONT = 2 but did not succeed.. I have
used Ctrl F9 for inserting the field
{IF{MERGEFIELD "CONT" 1 ={MERGEFIELD "RATE" \# 0.00}"
""}

I would like to do the same for upto CONT = 5

Can anybody give me a clue please

TIA

Rashid

  #2   Report Post  
Greg
 
Posts: n/a
Default

You will need a differnt field code for each rate expression:

{ IF {MERGEFIELD YourMergeField } = "1"{MERGEFIELD
YourOtherMergeField}}
{ IF {MERGEFIELD YourMergeField } = "2"{MERGEFIELD
YourOtherMergeField}}
etc.

  #3   Report Post  
Graham Mayor
 
Posts: n/a
Default

Hmmm

{ IF {MERGEFIELD YourMergeField } = "1" "{MERGEFIELD
YourOtherMergeField}"}{ IF {MERGEFIELD YourMergeField } = "2" "{MERGEFIELD
YourOtherMergeField}"}etc

might be nearer the mark. If you use = you would get multiple entries.

All the relevant conditional fields follow one another on the same line

--

Graham Mayor - Word MVP

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





Greg wrote:
You will need a differnt field code for each rate expression:

{ IF {MERGEFIELD YourMergeField } = "1"{MERGEFIELD
YourOtherMergeField}}
{ IF {MERGEFIELD YourMergeField } = "2"{MERGEFIELD
YourOtherMergeField}}
etc.



  #4   Report Post  
prkhan56
 
Posts: n/a
Default

Hi Greg
I got it working.

I would also try Graham's suggestion

Thanks to both of you

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
List Num field Debutante New Users 3 February 25th 05 09:51 AM
Creating Test With Answers Violet McCormick via OfficeKB.com New Users 1 January 28th 05 08:30 PM
Test Test New Users 1 January 23rd 05 04:39 PM
test Roscoe Microsoft Word Help 1 January 5th 05 11:16 PM
I can print a test page, but word documents will print a blank pa. Rileytide Microsoft Word Help 1 December 31st 04 01:57 AM


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