<span style="font-family: inherit"><span style="font-family: Helvetica Neue"><font size="3">i have two grouped of columns.one of them is subset of another.i want to write a macro compare them and if they were not equal insert second one to first one. algorithm ode:<br>
</font></span></span><br>
<font color="#00008B">if</font><font color="#000000">(</font><font color="#000000">code</font><font color="#000000">-</font><font color="#800000">1</font><font color="#000000">)&lt;&gt;(</font><font color="#000000">code</font><font color="#000000">-</font><font color="#800000">2</font><font color="#000000">)</font><font color="#00008B">AND</font><font color="#000000">(</font><font color="#000000">serial</font><font color="#000000">-</font><font color="#800000">1</font><font color="#000000">)&lt;&gt;(</font><font color="#000000">serial</font><font color="#000000">-</font><font color="#800000">2</font><font color="#000000">)</font><font color="#00008B">AND</font><font color="#000000">(</font><font color="#000000">amount</font><font color="#000000">-</font><font color="#800000">1</font><font color="#000000">)&lt;&gt;(</font><font color="#000000">amount</font><font color="#000000">-</font><font color="#800000">2</font><font color="#000000">)</font><font color="#00008B">then</font><font color="#000000">(</font><font color="#000000">code</font><font color="#000000">-</font><font color="#800000">1</font><font color="#000000">)==(</font><font color="#000000">code</font><font color="#000000">-</font><font color="#800000">2</font><font color="#000000">)</font><font color="#00008B">AND</font><font color="#000000">(</font><font color="#000000">serial</font><font color="#000000">-</font><font color="#800000">1</font><font color="#000000">)==(</font><font color="#000000">serial</font><font color="#000000">-</font><font color="#800000">2</font><font color="#000000">)</font><font color="#00008B">AND</font><font color="#000000">(</font><font color="#000000">amount</font><font color="#000000">-</font><font color="#800000">1</font><font color="#000000">)==(</font><font color="#000000">amount</font><font color="#000000">-</font><font color="#800000">2</font><font color="#000000">)</font><font color="#000000">the table i have is like below:</font><br>
<br>
<table style="width: 500px" class="wysiwyg_dashes"><tbody><tr valign="top" class="wysiwyg_dashes_tr"><td class="wysiwyg_dashes_td">code-1</td><td class="wysiwyg_dashes_td">serial-1</td><td class="wysiwyg_dashes_td">amount-1</td><td class="wysiwyg_dashes_td">code-2</td><td class="wysiwyg_dashes_td">serial-2</td><td class="wysiwyg_dashes_td">amount-2</td></tr><tr valign="top" class="wysiwyg_dashes_tr"><td class="wysiwyg_dashes_td">1</td><td class="wysiwyg_dashes_td">11</td><td class="wysiwyg_dashes_td">111</td><td class="wysiwyg_dashes_td">1</td><td class="wysiwyg_dashes_td">11</td><td class="wysiwyg_dashes_td">111</td></tr><tr valign="top" class="wysiwyg_dashes_tr"><td class="wysiwyg_dashes_td">3</td><td class="wysiwyg_dashes_td">33</td><td class="wysiwyg_dashes_td">333</td><td class="wysiwyg_dashes_td">1</td><td class="wysiwyg_dashes_td">11</td><td class="wysiwyg_dashes_td">11</td></tr><tr valign="top" class="wysiwyg_dashes_tr"><td class="wysiwyg_dashes_td"><br _moz_dirty="" type="_moz"></td><td class="wysiwyg_dashes_td"><br _moz_dirty="" type="_moz"></td><td class="wysiwyg_dashes_td"><br _moz_dirty="" type="_moz"></td><td class="wysiwyg_dashes_td">2</td><td class="wysiwyg_dashes_td">22</td><td class="wysiwyg_dashes_td">22</td></tr><tr valign="top" class="wysiwyg_dashes_tr"><td class="wysiwyg_dashes_td"><br _moz_dirty="" type="_moz"></td><td class="wysiwyg_dashes_td"><br _moz_dirty="" type="_moz"></td><td class="wysiwyg_dashes_td"><br _moz_dirty="" type="_moz"></td><td class="wysiwyg_dashes_td">3</td><td class="wysiwyg_dashes_td">33</td><td class="wysiwyg_dashes_td">33</td></tr><tr valign="top" class="wysiwyg_dashes_tr"><td class="wysiwyg_dashes_td"><br _moz_dirty="" type="_moz"></td><td class="wysiwyg_dashes_td"><br _moz_dirty="" type="_moz"></td><td class="wysiwyg_dashes_td"><br _moz_dirty="" type="_moz"></td><td class="wysiwyg_dashes_td">3</td><td class="wysiwyg_dashes_td">33</td><td class="wysiwyg_dashes_td">333</td></tr></tbody></table><br>
the result my macro should produce is table like below:<br>
<br>
<table style="width: 500px" class="wysiwyg_dashes"><tbody><tr valign="top" class="wysiwyg_dashes_tr"><td class="wysiwyg_dashes_td">code-1</td><td class="wysiwyg_dashes_td">serial-1</td><td class="wysiwyg_dashes_td">amount-1</td><td class="wysiwyg_dashes_td">code-2</td><td class="wysiwyg_dashes_td">serial-2</td><td class="wysiwyg_dashes_td">amount-2</td></tr><tr valign="top" class="wysiwyg_dashes_tr"><td class="wysiwyg_dashes_td">1</td><td class="wysiwyg_dashes_td">11</td><td class="wysiwyg_dashes_td">111</td><td class="wysiwyg_dashes_td">1</td><td class="wysiwyg_dashes_td">11</td><td class="wysiwyg_dashes_td">111</td></tr><tr valign="top" class="wysiwyg_dashes_tr"><td class="wysiwyg_dashes_td">3</td><td class="wysiwyg_dashes_td">33</td><td class="wysiwyg_dashes_td">333</td><td class="wysiwyg_dashes_td">1</td><td class="wysiwyg_dashes_td">11</td><td class="wysiwyg_dashes_td">11</td></tr><tr valign="top" class="wysiwyg_dashes_tr"><td class="wysiwyg_dashes_td"><strong>1</strong></td><td class="wysiwyg_dashes_td"><strong>11</strong></td><td class="wysiwyg_dashes_td"><strong>11</strong></td><td class="wysiwyg_dashes_td">2</td><td class="wysiwyg_dashes_td">22</td><td class="wysiwyg_dashes_td">22</td></tr><tr valign="top" class="wysiwyg_dashes_tr"><td class="wysiwyg_dashes_td"><strong>2</strong></td><td class="wysiwyg_dashes_td"><strong>22</strong></td><td class="wysiwyg_dashes_td"><strong>22</strong></td><td class="wysiwyg_dashes_td">3</td><td class="wysiwyg_dashes_td">33</td><td class="wysiwyg_dashes_td">33</td></tr><tr valign="top" class="wysiwyg_dashes_tr"><td class="wysiwyg_dashes_td"><strong>3</strong></td><td class="wysiwyg_dashes_td"><strong>33</strong></td><td class="wysiwyg_dashes_td"><strong>33</strong></td><td class="wysiwyg_dashes_td">3</td><td class="wysiwyg_dashes_td">33</td><td class="wysiwyg_dashes_td">333<br></td></tr></tbody></table><br>
i want also macro mark inserted row.like bold format in example.!<br>
<img src="images/smilies/animated/smile.gif" border="0" alt="" title="Smile" smilieid="157" class="inlineimg">