View Single Post
 
Old 04-28-2021, 02:37 AM
S7ewie S7ewie is offline Windows 10 Office 2019
Novice
 
Join Date: Apr 2021
Posts: 5
S7ewie is on a distinguished road
Default Conditionally Shade Table Cells

Hi all,

I'm trying to shade a table cell based on the value of a mail merge field. In this case, I'm simply using "R", "G" and "B" to depict whether the cell is red green or blue. I'm trying to follow the section in the sticky on this but I'm just getting coloured text. Am I misunderstanding the use for this or doing something completely wrong?

I've made a single cell table, Alt+F9 to bring up the code. I'm using Ctrl+F to ender new brackets and "Insert Merge Field" to add fields. My current test code is:

Code:
{IF{ MERGEFIELD Name }= "R" "*tab**tab*
*tab*Test Text*tab*
*tab**tab*" \* Charformat }
This just gives me "Test Text" in red if the value is "R". I just want to shade the cell red with no text? Am I doing something wrong or have I misunderstood that this code is used for?
Reply With Quote