Word Conditional Formatting Mergefield Help Needed

kiki443

Board Regular
Joined
Feb 6, 2005
Messages
135
Hi,

I have a document where I have inserted Merge Fields. I need to format the field based on a date returned from another field.

Merge field 1=date of next review
Merge field 2=date of membership expiration

I would like for Merge field 2 to be formatted in Red if the date is before the date in Merge field 1.
Ex:
Date of next review: 7/22/14
Date of membership expiration: 7/20/2014
I am trying to format the date in Red
This is what I have so far but I am getting an error. Or the field comes back blank.
{if{mergefield memexp}<{mergefield review}{mergefield memexp}{mergefield memexp}}
I colored the appropriate mergefield statement. Not sure what's wrong.
Please help.

KIKI
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
This is rather more complicated than you'd expect. To do this, you need a field coded as:
{={MERGEFIELD memexp \@ YYYYMMDD}-{MERGEFIELD review \@ YYYYMMDD} \# {MERGEFIELD memexp};{MERGEFIELD memexp}}
where the final {MERGEFIELD memexp} is formatted red.

Note: The field brace pairs (i.e. '{ }') for the above example are created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac); you can't simply type them or copy & paste them from this message. Nor is it practicable to add them via any of the standard Word dialogues. The spaces represented in the field construction are all required.
 
Upvote 0

Forum statistics

Threads
1,214,962
Messages
6,122,482
Members
449,088
Latest member
Melvetica

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top