Unfortunately using merge field conditions as shown in that thread doesn't give me the results I'm looking for.

I tried using the following code:
mergefield condition code.jpg

It sort of works, but the background color doesn't fill the whole cell, and I lose all formatting.
sample output.jpg

The following picture is how I want to cells to look. I assume i need to use VBA code to get this to look the way I want, but I'm not sure how to write it to select based on the mergefield. I'm using Word 2007 if that makes a difference.
desired output.jpg