Nested If

V

vobonyo

I'm trying to merge a document with a data source from
Excel but the result I get is always the first
percentage field repeated for all statements
regardless of the condition. It ignores the rest of
the nested if_statement.

{ IF {MERGEFIELD PledgeCode} = “05 Foundation†“5%†“{
IF {MERGEFIELD PledgeCode} = “05 Builders†“7%â€{ IF
{MERGEFIELD PledgeCode} = “05 Encouragers†“10%â€{ IF
{MERGEFIELD PledgeCode} = “05 Restorersâ€â€15%â€{ IF
{MERGEFIELD PledgeCode} = “05 Sustainers†“20%†“†}â€
}†}†}â€

This outputs 5% regardless of the PledgeCode

Vera
 
P

Peter Jamieson

I believe Word gets confused because the first part of the code is a number,
and that if you change each

{ MERGEFIELD PledgeCode }

to

"{ MERGEFIELD PledgeCode }"

the IF statement will work properly.

Peter Jamieson
 
V

vobonyo

Thanks. It works wonderfully now.

Vera

Peter Jamieson said:
I believe Word gets confused because the first part of the code is a number,
and that if you change each

{ MERGEFIELD PledgeCode }

to

"{ MERGEFIELD PledgeCode }"

the IF statement will work properly.

Peter Jamieson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top