I am having such a difficult time creating a macro that will help me reduce the 5+hours I have to spend each week manually copying & pasting all of this data. If anyone can help, please know that you will be making an IMMENSE difference in this worker bee's life!
I have a workbook with two sheets (Sheet1 & Sheet2). Sheet1 has license #'s in column A and the state that the license belongs to in column B like this:
<TABLE style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; WIDTH: 500px; LETTER-SPACING: normal; BORDER-COLLAPSE: collapse; FONT: 13px Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; COLOR: rgb(34,34,34); WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class=wysiwyg_dashes><TBODY><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>COLUMN A</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>COLUMN B</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11111</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Alaska</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11112</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Alabama</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11113</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Arkansas</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11114</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Arkansas</TD></TR></TBODY></TABLE>
Sheet2 has three columns. Column A has the license #'s, column B has the state that the license belongs to and Columns C shows a line-of-authority tied to that license #.
<TABLE style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; WIDTH: 500px; LETTER-SPACING: normal; BORDER-COLLAPSE: collapse; FONT: 13px Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; COLOR: rgb(34,34,34); WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class=wysiwyg_dashes><TBODY><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>COLUMN A</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>COLUMN B</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>COLUMN C</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11111</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Alaska</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Property</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11111</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Alaska</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Casualty</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11112</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Alaska</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Life</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11112</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Alaska</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Health</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11112</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Alabama</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Property</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11112</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Alabama</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Casualty</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11113</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Arkansas</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Life</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11113</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Arkansas</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Health</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11114</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Arkansas</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Life</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11114</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Arkansas</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Health</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>12345</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Arizona</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Property</TD></TR></TBODY></TABLE>
I'm trying to write a macro that will compare the license # and state in Sheet1 to the license # and state in Sheet2. If it matches, append the contents of Column C to the corresponding row in Sheet1.
Here's the thing...Sheet2 contains the entries for all licenses in the company (so this table is HUGE). And there are multiple entries for each state license # (notice how there's two entries above for AK license # 11111 - one for the Property line and one for the Casualty line.
After my macro is run, I want Sheet1 to show all the lines-of-authority on a single line. So if I ran my macro on the above example, after it's run I would have this in Sheet1:
<TABLE style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; WIDTH: 500px; LETTER-SPACING: normal; BORDER-COLLAPSE: collapse; FONT: 13px Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; COLOR: rgb(34,34,34); WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class=wysiwyg_dashes><TBODY><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>COLUMN A</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>COLUMN B</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>COLUMN C</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11111</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Alaska</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Property Casualty</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11112</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Alabama</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Property Casualty</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11113</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Arkansas</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Life Health</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11114</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Arkansas</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Life Health</TD></TR></TBODY></TABLE>
PLEASE HELP!!!
I have a workbook with two sheets (Sheet1 & Sheet2). Sheet1 has license #'s in column A and the state that the license belongs to in column B like this:
<TABLE style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; WIDTH: 500px; LETTER-SPACING: normal; BORDER-COLLAPSE: collapse; FONT: 13px Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; COLOR: rgb(34,34,34); WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class=wysiwyg_dashes><TBODY><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>COLUMN A</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>COLUMN B</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11111</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Alaska</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11112</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Alabama</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11113</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Arkansas</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11114</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Arkansas</TD></TR></TBODY></TABLE>
Sheet2 has three columns. Column A has the license #'s, column B has the state that the license belongs to and Columns C shows a line-of-authority tied to that license #.
<TABLE style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; WIDTH: 500px; LETTER-SPACING: normal; BORDER-COLLAPSE: collapse; FONT: 13px Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; COLOR: rgb(34,34,34); WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class=wysiwyg_dashes><TBODY><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>COLUMN A</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>COLUMN B</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>COLUMN C</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11111</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Alaska</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Property</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11111</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Alaska</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Casualty</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11112</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Alaska</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Life</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11112</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Alaska</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Health</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11112</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Alabama</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Property</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11112</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Alabama</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Casualty</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11113</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Arkansas</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Life</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11113</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Arkansas</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Health</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11114</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Arkansas</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Life</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11114</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Arkansas</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Health</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>12345</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Arizona</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Property</TD></TR></TBODY></TABLE>
I'm trying to write a macro that will compare the license # and state in Sheet1 to the license # and state in Sheet2. If it matches, append the contents of Column C to the corresponding row in Sheet1.
Here's the thing...Sheet2 contains the entries for all licenses in the company (so this table is HUGE). And there are multiple entries for each state license # (notice how there's two entries above for AK license # 11111 - one for the Property line and one for the Casualty line.
After my macro is run, I want Sheet1 to show all the lines-of-authority on a single line. So if I ran my macro on the above example, after it's run I would have this in Sheet1:
<TABLE style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; WIDTH: 500px; LETTER-SPACING: normal; BORDER-COLLAPSE: collapse; FONT: 13px Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; COLOR: rgb(34,34,34); WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class=wysiwyg_dashes><TBODY><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>COLUMN A</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>COLUMN B</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>COLUMN C</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11111</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Alaska</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Property Casualty</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11112</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Alabama</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Property Casualty</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11113</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Arkansas</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Life Health</TD></TR><TR class=wysiwyg_dashes_tr vAlign=top><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>11114</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Arkansas</TD><TD style="BORDER-BOTTOM: rgb(153,153,153) 1px dotted; BORDER-LEFT: rgb(153,153,153) 1px dotted; PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BORDER-TOP: rgb(153,153,153) 1px dotted; BORDER-RIGHT: rgb(153,153,153) 1px dotted; PADDING-TOP: 3px; border-image: initial" class=wysiwyg_dashes_td>Life Health</TD></TR></TBODY></TABLE>
PLEASE HELP!!!