I am relatively new to VBA and am looking for some assistance.
I have a template (below) that I need to populate approx 20 times and save a new workbook for each of them.
The cost centre is the marker for each file name.
<TABLE style="WIDTH: 394pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=525 border=0 x:str><COLGROUP><COL style="WIDTH: 68pt; mso-width-source: userset; mso-width-alt: 3328" width=91><COL style="WIDTH: 73pt; mso-width-source: userset; mso-width-alt: 3547" width=97><COL style="WIDTH: 59pt; mso-width-source: userset; mso-width-alt: 2852" width=78><COL style="WIDTH: 194pt; mso-width-source: userset; mso-width-alt: 9472" width=259><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD class=xl23 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 68pt; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: yellow" width=91 height=17>Cost Centre</TD><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; WIDTH: 73pt; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: yellow" width=97>June</TD><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; WIDTH: 59pt; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: yellow" align=right width=78 x:num>2011</TD><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; WIDTH: 194pt; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: yellow" width=259>June2011 Tax Details</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl20 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20001</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Code 1</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" align=right x:num>0</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Tax Description 1</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl20 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20001</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Code 2</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" align=right x:num>0</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Tax Description 2</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl20 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20001</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Code 3</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" align=right x:num>0</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Tax Description 3</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl20 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20001</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Code 4</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" align=right x:num>0</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Tax Description 4</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl20 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20001</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Code 5</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" align=right x:num>0</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Tax Description 5</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl20 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20001</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Code 6</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" align=right x:num>0</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Tax Description 6</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl20 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20001</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Code 7</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" align=right x:num>0</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Tax Description 7</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl20 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20001</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Code 8</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" align=right x:num>0</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Tax Description 8</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl20 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20001</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Code 9</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" align=right x:num>0</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Tax Description 9</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl20 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20001</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Code 10</TD><TD class=xl22 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: #ffff99" x:num="-1000">- 1,000.00 </TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Tax Description 10</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl20 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20001</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Code 11</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" align=right x:num>0</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Tax Description 11</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl20 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20001</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Code 12</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" align=right x:num>0</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Tax Description 12</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl20 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20001</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Code 13</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" align=right x:num>0</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Tax Description 13</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl20 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20001</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Code 14</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" align=right x:num>0</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Tax Description 14</TD></TR></TBODY></TABLE>
I have a lookup table in the following format:
<TABLE style="WIDTH: 149pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=199 border=0 x:str><COLGROUP><COL style="WIDTH: 63pt; mso-width-source: userset; mso-width-alt: 3584" width=84><COL style="WIDTH: 86pt; mso-width-source: userset; mso-width-alt: 4906" width=115><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD class=xl24 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8 0.5pt; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 63pt; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right width=84 height=17 x:num>20001</TD><TD class=xl25 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; WIDTH: 86pt; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" width=115 x:num="-1000">- 1,000.00 </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl24 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20002</TD><TD class=xl25 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" x:num="-20023">- 20,023.00 </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl24 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20003</TD><TD class=xl25 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" x:num="-565.5">- 565.50 </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl24 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20004</TD><TD class=xl25 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" x:num="-484">- 484.00 </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl24 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20005</TD><TD class=xl25 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" x:num="-898.88">- 898.88 </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl24 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20006</TD><TD class=xl25 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" x:num="-65556.6">- 65,556.60 </TD></TR></TBODY></TABLE>
What I am looking for is a looping code that will pull the Cost Centre into cell B1, then look up in cell C11 from the look up table, and then save down a copy of a new workbook with the name of the sheet using the cost centre.
Thanks!
I have a template (below) that I need to populate approx 20 times and save a new workbook for each of them.
The cost centre is the marker for each file name.
<TABLE style="WIDTH: 394pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=525 border=0 x:str><COLGROUP><COL style="WIDTH: 68pt; mso-width-source: userset; mso-width-alt: 3328" width=91><COL style="WIDTH: 73pt; mso-width-source: userset; mso-width-alt: 3547" width=97><COL style="WIDTH: 59pt; mso-width-source: userset; mso-width-alt: 2852" width=78><COL style="WIDTH: 194pt; mso-width-source: userset; mso-width-alt: 9472" width=259><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD class=xl23 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 68pt; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: yellow" width=91 height=17>Cost Centre</TD><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; WIDTH: 73pt; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: yellow" width=97>June</TD><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; WIDTH: 59pt; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: yellow" align=right width=78 x:num>2011</TD><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; WIDTH: 194pt; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: yellow" width=259>June2011 Tax Details</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl20 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20001</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Code 1</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" align=right x:num>0</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Tax Description 1</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl20 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20001</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Code 2</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" align=right x:num>0</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Tax Description 2</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl20 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20001</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Code 3</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" align=right x:num>0</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Tax Description 3</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl20 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20001</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Code 4</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" align=right x:num>0</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Tax Description 4</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl20 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20001</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Code 5</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" align=right x:num>0</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Tax Description 5</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl20 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20001</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Code 6</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" align=right x:num>0</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Tax Description 6</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl20 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20001</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Code 7</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" align=right x:num>0</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Tax Description 7</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl20 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20001</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Code 8</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" align=right x:num>0</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Tax Description 8</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl20 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20001</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Code 9</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" align=right x:num>0</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Tax Description 9</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl20 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20001</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Code 10</TD><TD class=xl22 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: #ffff99" x:num="-1000">- 1,000.00 </TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Tax Description 10</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl20 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20001</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Code 11</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" align=right x:num>0</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Tax Description 11</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl20 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20001</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Code 12</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" align=right x:num>0</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Tax Description 12</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl20 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20001</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Code 13</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" align=right x:num>0</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Tax Description 13</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl20 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20001</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Code 14</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" align=right x:num>0</TD><TD class=xl21 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent">Tax Description 14</TD></TR></TBODY></TABLE>
I have a lookup table in the following format:
<TABLE style="WIDTH: 149pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=199 border=0 x:str><COLGROUP><COL style="WIDTH: 63pt; mso-width-source: userset; mso-width-alt: 3584" width=84><COL style="WIDTH: 86pt; mso-width-source: userset; mso-width-alt: 4906" width=115><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD class=xl24 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8 0.5pt; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 63pt; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right width=84 height=17 x:num>20001</TD><TD class=xl25 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; WIDTH: 86pt; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" width=115 x:num="-1000">- 1,000.00 </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl24 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20002</TD><TD class=xl25 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" x:num="-20023">- 20,023.00 </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl24 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20003</TD><TD class=xl25 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" x:num="-565.5">- 565.50 </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl24 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20004</TD><TD class=xl25 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" x:num="-484">- 484.00 </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl24 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20005</TD><TD class=xl25 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" x:num="-898.88">- 898.88 </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl24 style="BORDER-RIGHT: #d4d0c8 0.5pt; BORDER-TOP: #d4d0c8; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: #d4d0c8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right height=17 x:num>20006</TD><TD class=xl25 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent" x:num="-65556.6">- 65,556.60 </TD></TR></TBODY></TABLE>
What I am looking for is a looping code that will pull the Cost Centre into cell B1, then look up in cell C11 from the look up table, and then save down a copy of a new workbook with the name of the sheet using the cost centre.
Thanks!