VBA Extract Column Data to Populate Table

austinj

New Member
Joined
Jul 20, 2009
Messages
4
Basically I have the following data that I want to put in a table as shown in the second quote.

I would like to write some code that checks "Header, Mis and Veh" if each one matches to the corresponding line in Table2, it places Answer in that cell.

For example, for (String2, 1, 52) (Header, Mis, Veh) it would populate Cell (String 2, 1, 52 with the Answer: 32)

TABLE1
Code:
<table border="0" cellpadding="0" cellspacing="0" width="256"><colgroup><col style="width:48pt" width="64"> </colgroup><colgroup><col style="width:48pt" width="64"> </colgroup><colgroup><col style="width:48pt" width="64"> </colgroup><colgroup><col style="width:48pt" width="64"> </colgroup><tbody><tr style="height:15.0pt" height="20"><td style="height:15.0pt;width:48pt" height="20" width="64">[SIZE=1]Header[/SIZE]</td><td style="width:48pt" width="64">[SIZE=1]Mis[/SIZE]</td><td style="width:48pt" width="64">[SIZE=1]Veh[/SIZE]</td><td class="xl63" style="width:48pt" width="64">[SIZE=1]Answer[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String1[/SIZE]</td><td align="right">[SIZE=1]1[/SIZE]</td><td align="right">[SIZE=1]52[/SIZE]</td><td class="xl63" align="right">[SIZE=1]0[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String2[/SIZE]</td><td align="right">[SIZE=1]1[/SIZE]</td><td align="right">[SIZE=1]52[/SIZE]</td><td class="xl63" align="right">[SIZE=1]32[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String3[/SIZE]</td><td align="right">[SIZE=1]1[/SIZE]</td><td align="right">[SIZE=1]52[/SIZE]</td><td class="xl63" align="right">[SIZE=1]10[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String1[/SIZE]</td><td align="right">[SIZE=1]1[/SIZE]</td><td align="right">[SIZE=1]53[/SIZE]</td><td class="xl63" align="right">[SIZE=1]0[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String2[/SIZE]</td><td align="right">[SIZE=1]1[/SIZE]</td><td align="right">[SIZE=1]53[/SIZE]</td><td class="xl63" align="right">[SIZE=1]33[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String3[/SIZE]</td><td align="right">[SIZE=1]1[/SIZE]</td><td align="right">[SIZE=1]53[/SIZE]</td><td class="xl63" align="right">[SIZE=1]11[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String1[/SIZE]</td><td align="right">[SIZE=1]1[/SIZE]</td><td align="right">[SIZE=1]55[/SIZE]</td><td class="xl63" align="right">[SIZE=1]0[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String2[/SIZE]</td><td align="right">[SIZE=1]1[/SIZE]</td><td align="right">[SIZE=1]55[/SIZE]</td><td class="xl63" align="right">[SIZE=1]32[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String3[/SIZE]</td><td align="right">[SIZE=1]1[/SIZE]</td><td align="right">[SIZE=1]55[/SIZE]</td><td class="xl63" align="right">[SIZE=1]11[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String1[/SIZE]</td><td align="right">[SIZE=1]2[/SIZE]</td><td align="right">[SIZE=1]41[/SIZE]</td><td class="xl63" align="right">[SIZE=1]0[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String2[/SIZE]</td><td align="right">[SIZE=1]2[/SIZE]</td><td align="right">[SIZE=1]41[/SIZE]</td><td class="xl63" align="right">[SIZE=1]32[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String3[/SIZE]</td><td align="right">[SIZE=1]2[/SIZE]</td><td align="right">[SIZE=1]41[/SIZE]</td><td class="xl63" align="right">[SIZE=1]9[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String1[/SIZE]</td><td align="right">[SIZE=1]2[/SIZE]</td><td align="right">[SIZE=1]43[/SIZE]</td><td class="xl63" align="right">[SIZE=1]0[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String2[/SIZE]</td><td align="right">[SIZE=1]2[/SIZE]</td><td align="right">[SIZE=1]43[/SIZE]</td><td class="xl63" align="right">[SIZE=1]33[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String3[/SIZE]</td><td align="right">[SIZE=1]2[/SIZE]</td><td align="right">[SIZE=1]43[/SIZE]</td><td class="xl63" align="right">[SIZE=1]10[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String1[/SIZE]</td><td align="right">[SIZE=1]2[/SIZE]</td><td align="right">[SIZE=1]55[/SIZE]</td><td class="xl63" align="right">[SIZE=1]0[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String2[/SIZE]</td><td align="right">[SIZE=1]2[/SIZE]</td><td align="right">[SIZE=1]55[/SIZE]</td><td class="xl63" align="right">[SIZE=1]32[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String3[/SIZE]</td><td align="right">[SIZE=1]2[/SIZE]</td><td align="right">[SIZE=1]55[/SIZE]</td><td class="xl63" align="right">[SIZE=1]11[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String1[/SIZE]</td><td align="right">[SIZE=1]4[/SIZE]</td><td align="right">[SIZE=1]40[/SIZE]</td><td class="xl63" align="right">[SIZE=1]0[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String2[/SIZE]</td><td align="right">[SIZE=1]4[/SIZE]</td><td align="right">[SIZE=1]40[/SIZE]</td><td class="xl63" align="right">[SIZE=1]32[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String3[/SIZE]</td><td align="right">[SIZE=1]4[/SIZE]</td><td align="right">[SIZE=1]40[/SIZE]</td><td class="xl63" align="right">[SIZE=1]3[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String1[/SIZE]</td><td align="right">[SIZE=1]4[/SIZE]</td><td align="right">[SIZE=1]43[/SIZE]</td><td class="xl63" align="right">[SIZE=1]0[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String2[/SIZE]</td><td align="right">[SIZE=1]4[/SIZE]</td><td align="right">[SIZE=1]43[/SIZE]</td><td class="xl63" align="right">[SIZE=1]30[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String3[/SIZE]</td><td align="right">[SIZE=1]4[/SIZE]</td><td align="right">[SIZE=1]43[/SIZE]</td><td class="xl63" align="right">[SIZE=1]4[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String1[/SIZE]</td><td align="right">[SIZE=1]4[/SIZE]</td><td align="right">[SIZE=1]55[/SIZE]</td><td class="xl63" align="right">[SIZE=1]0[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String2[/SIZE]</td><td align="right">[SIZE=1]4[/SIZE]</td><td align="right">[SIZE=1]55[/SIZE]</td><td class="xl63" align="right">[SIZE=1]32[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String3[/SIZE]</td><td align="right">[SIZE=1]4[/SIZE]</td><td align="right">[SIZE=1]55[/SIZE]</td><td class="xl63" align="right">[SIZE=1]4[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String1[/SIZE]</td><td align="right">[SIZE=1]5[/SIZE]</td><td align="right">[SIZE=1]40[/SIZE]</td><td class="xl63" align="right">[SIZE=1]0[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String2[/SIZE]</td><td align="right">[SIZE=1]5[/SIZE]</td><td align="right">[SIZE=1]40[/SIZE]</td><td class="xl63" align="right">[SIZE=1]32[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String3[/SIZE]</td><td align="right">[SIZE=1]5[/SIZE]</td><td align="right">[SIZE=1]40[/SIZE]</td><td class="xl63" align="right">[SIZE=1]6[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String1[/SIZE]</td><td align="right">[SIZE=1]5[/SIZE]</td><td align="right">[SIZE=1]43[/SIZE]</td><td class="xl63" align="right">[SIZE=1]0[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String2[/SIZE]</td><td align="right">[SIZE=1]5[/SIZE]</td><td align="right">[SIZE=1]43[/SIZE]</td><td class="xl63" align="right">[SIZE=1]33[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String3[/SIZE]</td><td align="right">[SIZE=1]5[/SIZE]</td><td align="right">[SIZE=1]43[/SIZE]</td><td class="xl63" align="right">[SIZE=1]8[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String1[/SIZE]</td><td align="right">[SIZE=1]5[/SIZE]</td><td align="right">[SIZE=1]55[/SIZE]</td><td class="xl63" align="right">[SIZE=1]0[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String2[/SIZE]</td><td align="right">[SIZE=1]5[/SIZE]</td><td align="right">[SIZE=1]55[/SIZE]</td><td class="xl63" align="right">[SIZE=1]31[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String3[/SIZE]</td><td align="right">[SIZE=1]5[/SIZE]</td><td align="right">[SIZE=1]55[/SIZE]</td><td class="xl63" align="right">[SIZE=1]6[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String1[/SIZE]</td><td class="xl64">[SIZE=1]5a[/SIZE]</td><td align="right">[SIZE=1]40[/SIZE]</td><td class="xl63" align="right">[SIZE=1]0[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String2[/SIZE]</td><td class="xl64">[SIZE=1]5a[/SIZE]</td><td align="right">[SIZE=1]40[/SIZE]</td><td class="xl63" align="right">[SIZE=1]32[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String3[/SIZE]</td><td class="xl64">[SIZE=1]5a[/SIZE]</td><td align="right">[SIZE=1]40[/SIZE]</td><td class="xl63" align="right">[SIZE=1]6[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String1[/SIZE]</td><td class="xl64">[SIZE=1]5a[/SIZE]</td><td align="right">[SIZE=1]43[/SIZE]</td><td class="xl63" align="right">[SIZE=1]0[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String2[/SIZE]</td><td class="xl64">[SIZE=1]5a[/SIZE]</td><td align="right">[SIZE=1]43[/SIZE]</td><td class="xl63" align="right">[SIZE=1]32[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String3[/SIZE]</td><td class="xl64">[SIZE=1]5a[/SIZE]</td><td align="right">[SIZE=1]43[/SIZE]</td><td class="xl63" align="right">[SIZE=1]7[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String1[/SIZE]</td><td class="xl64">[SIZE=1]5a[/SIZE]</td><td align="right">[SIZE=1]55[/SIZE]</td><td class="xl63" align="right">[SIZE=1]0[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String2[/SIZE]</td><td class="xl64">[SIZE=1]5a[/SIZE]</td><td align="right">[SIZE=1]55[/SIZE]</td><td class="xl63" align="right">[SIZE=1]32[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String3[/SIZE]</td><td class="xl64">[SIZE=1]5a[/SIZE]</td><td align="right">[SIZE=1]55[/SIZE]</td><td class="xl63" align="right">[SIZE=1]7[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String1[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]40[/SIZE]</td><td class="xl63" align="right">[SIZE=1]0[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String2[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]40[/SIZE]</td><td class="xl63" align="right">[SIZE=1]32[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String3[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]40[/SIZE]</td><td class="xl63" align="right">[SIZE=1]5[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String1[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]41[/SIZE]</td><td class="xl63" align="right">[SIZE=1]0[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String2[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]41[/SIZE]</td><td class="xl63" align="right">[SIZE=1]32[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String3[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]41[/SIZE]</td><td class="xl63" align="right">[SIZE=1]6[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String1[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]42[/SIZE]</td><td class="xl63" align="right">[SIZE=1]0[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String2[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]42[/SIZE]</td><td class="xl63" align="right">[SIZE=1]32[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String3[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]42[/SIZE]</td><td class="xl63" align="right">[SIZE=1]6[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String1[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]43[/SIZE]</td><td class="xl63" align="right">[SIZE=1]0[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String2[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]43[/SIZE]</td><td class="xl63" align="right">[SIZE=1]32[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String3[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]43[/SIZE]</td><td class="xl63" align="right">[SIZE=1]6[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String1[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]50[/SIZE]</td><td class="xl63" align="right">[SIZE=1]0[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String2[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]50[/SIZE]</td><td class="xl63" align="right">[SIZE=1]32[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String3[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]50[/SIZE]</td><td class="xl63" align="right">[SIZE=1]5[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String1[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]51[/SIZE]</td><td class="xl63" align="right">[SIZE=1]0[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String2[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]51[/SIZE]</td><td class="xl63" align="right">[SIZE=1]32[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String3[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]51[/SIZE]</td><td class="xl63" align="right">[SIZE=1]5[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String1[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]52[/SIZE]</td><td class="xl63" align="right">[SIZE=1]0[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String2[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]52[/SIZE]</td><td class="xl63" align="right">[SIZE=1]32[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String3[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]52[/SIZE]</td><td class="xl63" align="right">[SIZE=1]5[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String1[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]53[/SIZE]</td><td class="xl63" align="right">[SIZE=1]0[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String2[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]53[/SIZE]</td><td class="xl63" align="right">[SIZE=1]32[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String3[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]53[/SIZE]</td><td class="xl63" align="right">[SIZE=1]5[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String1[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]54[/SIZE]</td><td class="xl63" align="right">[SIZE=1]0[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String2[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]54[/SIZE]</td><td class="xl63" align="right">[SIZE=1]32[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String3[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]54[/SIZE]</td><td class="xl63" align="right">[SIZE=1]6[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String1[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]55[/SIZE]</td><td class="xl63" align="right">[SIZE=1]0[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String2[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]55[/SIZE]</td><td class="xl63" align="right">[SIZE=1]32[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String3[/SIZE]</td><td align="right">[SIZE=1]6[/SIZE]</td><td align="right">[SIZE=1]55[/SIZE]</td><td class="xl63" align="right">[SIZE=1]6[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String1[/SIZE]</td><td align="right">[SIZE=1]7[/SIZE]</td><td align="right">[SIZE=1]40[/SIZE]</td><td class="xl63" align="right">[SIZE=1]0[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String2[/SIZE]</td><td align="right">[SIZE=1]7[/SIZE]</td><td align="right">[SIZE=1]40[/SIZE]</td><td class="xl63" align="right">[SIZE=1]32[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String3[/SIZE]</td><td align="right">[SIZE=1]7[/SIZE]</td><td align="right">[SIZE=1]40[/SIZE]</td><td class="xl63" align="right">[SIZE=1]4[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String1[/SIZE]</td><td align="right">[SIZE=1]7[/SIZE]</td><td align="right">[SIZE=1]43[/SIZE]</td><td class="xl63" align="right">[SIZE=1]0[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String2[/SIZE]</td><td align="right">[SIZE=1]7[/SIZE]</td><td align="right">[SIZE=1]43[/SIZE]</td><td class="xl63" align="right">[SIZE=1]33[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String3[/SIZE]</td><td align="right">[SIZE=1]7[/SIZE]</td><td align="right">[SIZE=1]43[/SIZE]</td><td class="xl63" align="right">[SIZE=1]5[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String1[/SIZE]</td><td align="right">[SIZE=1]7[/SIZE]</td><td align="right">[SIZE=1]55[/SIZE]</td><td class="xl63" align="right">[SIZE=1]0[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String2[/SIZE]</td><td align="right">[SIZE=1]7[/SIZE]</td><td align="right">[SIZE=1]55[/SIZE]</td><td class="xl63" align="right">[SIZE=1]31[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String3[/SIZE]</td><td align="right">[SIZE=1]7[/SIZE]</td><td align="right">[SIZE=1]55[/SIZE]</td><td class="xl63" align="right">[SIZE=1]5[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String1[/SIZE]</td><td align="right">[SIZE=1]8[/SIZE]</td><td align="right">[SIZE=1]55[/SIZE]</td><td class="xl63" align="right">[SIZE=1]0[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String2[/SIZE]</td><td align="right">[SIZE=1]8[/SIZE]</td><td align="right">[SIZE=1]55[/SIZE]</td><td class="xl63" align="right">[SIZE=1]32[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td style="height:15.0pt" height="20">[SIZE=1]String3[/SIZE]</td><td align="right">[SIZE=1]8[/SIZE]</td><td align="right">[SIZE=1]55[/SIZE]</td><td class="xl63" align="right">[SIZE=1]3[/SIZE]</td></tr> </tbody></table>
TABLE1 - This is the end goal I want created from the above data
Code:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <table border="0" cellpadding="0" cellspacing="0" width="768"><colgroup><col style="width:48pt" span="12" width="64"> </colgroup><tbody><tr style="height:15.0pt" height="20"><td class="xl71" style="height:15.0pt;width:48pt" height="20" width="64">
</td><td class="xl72" style="width:48pt" width="64">
</td><td class="xl70" style="width:48pt" align="right" width="64">[SIZE=1]40[/SIZE]</td><td class="xl67" style="border-left:none;width:48pt" align="right" width="64">[SIZE=1]41[/SIZE]</td><td class="xl67" style="border-left:none;width:48pt" align="right" width="64">[SIZE=1]42[/SIZE]</td><td class="xl67" style="border-left:none;width:48pt" align="right" width="64">[SIZE=1]43[/SIZE]</td><td class="xl67" style="border-left:none;width:48pt" align="right" width="64">[SIZE=1]50[/SIZE]</td><td class="xl67" style="border-left:none;width:48pt" align="right" width="64">[SIZE=1]51[/SIZE]</td><td class="xl67" style="border-left:none;width:48pt" align="right" width="64">[SIZE=1]52[/SIZE]</td><td class="xl67" style="border-left:none;width:48pt" align="right" width="64">[SIZE=1]53[/SIZE]</td><td class="xl67" style="border-left:none;width:48pt" align="right" width="64">[SIZE=1]54[/SIZE]</td><td class="xl67" style="border-left:none;width:48pt" align="right" width="64">[SIZE=1]55[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td rowspan="2" class="xl65" style="height:30.0pt" height="40">[SIZE=1]1[/SIZE]</td><td class="xl67" style="border-top:none;border-left:none">[SIZE=1]String2[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]32[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]33[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]32[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td class="xl67" style="height:15.0pt;border-top:none;border-left:   none" height="20">[SIZE=1]String3[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]10[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]11[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]11[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td rowspan="2" class="xl66" style="height:30.0pt;border-top:none" height="40">[SIZE=1]2[/SIZE]</td><td class="xl67" style="border-top:none;border-left:none">[SIZE=1]String2[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]32[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]33[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]32[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td class="xl67" style="height:15.0pt;border-top:none;border-left:   none" height="20">[SIZE=1]String3[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]9[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]10[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]11[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td rowspan="2" class="xl66" style="height:30.0pt;border-top:none" height="40">[SIZE=1]3[/SIZE]</td><td class="xl67" style="border-top:none;border-left:none">[SIZE=1]String2[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td></tr><tr style="height:15.0pt" height="20"><td class="xl67" style="height:15.0pt;border-top:none;border-left:   none" height="20">[SIZE=1]String3[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td></tr><tr style="height:15.0pt" height="20"><td rowspan="2" class="xl66" style="height:30.0pt;border-top:none" height="40">[SIZE=1]4[/SIZE]</td><td class="xl67" style="border-top:none;border-left:none">[SIZE=1]String2[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]32[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]30[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]32[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td class="xl67" style="height:15.0pt;border-top:none;border-left:   none" height="20">[SIZE=1]String3[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]3[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]4[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]4[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td rowspan="2" class="xl66" style="height:30.0pt;border-top:none" height="40">[SIZE=1]5[/SIZE]</td><td class="xl67" style="border-top:none;border-left:none">[SIZE=1]String2[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]32[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]33[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]31[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td class="xl67" style="height:15.0pt;border-top:none;border-left:   none" height="20">[SIZE=1]String3[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]6[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]8[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]6[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td rowspan="2" class="xl66" style="height:30.0pt;border-top:none" height="40">[SIZE=1]5a[/SIZE]</td><td class="xl67" style="border-top:none;border-left:none">[SIZE=1]String2[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]32[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]32[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]32[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td class="xl67" style="height:15.0pt;border-top:none;border-left:   none" height="20">[SIZE=1]String3[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]6[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]7[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]7[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td rowspan="2" class="xl66" style="height:30.0pt;border-top:none" height="40">[SIZE=1]6[/SIZE]</td><td class="xl67" style="border-top:none;border-left:none">[SIZE=1]String2[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]32[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]32[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]32[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]32[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]32[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]32[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]32[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]32[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]32[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]32[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td class="xl67" style="height:15.0pt;border-top:none;border-left:   none" height="20">[SIZE=1]String3[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]5[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]6[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]6[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]6[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]5[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]5[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]5[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]5[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]6[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]6[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td rowspan="2" class="xl66" style="height:30.0pt;border-top:none" height="40">[SIZE=1]7[/SIZE]</td><td class="xl67" style="border-top:none;border-left:none">[SIZE=1]String2[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]32[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]33[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]31[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td class="xl67" style="height:15.0pt;border-top:none;border-left:   none" height="20">[SIZE=1]String3[/SIZE]</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]4[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]5[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]5[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td rowspan="2" class="xl66" style="height:30.0pt;border-top:none" height="40">[SIZE=1]8[/SIZE]</td><td class="xl67" style="border-top:none;border-left:none">[SIZE=1]String2[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]32[/SIZE]</td></tr><tr style="height:15.0pt" height="20"><td class="xl67" style="height:15.0pt;border-top:none;border-left:   none" height="20">[SIZE=1]String3[/SIZE]</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl68" style="border-top:none;border-left:none">
</td><td class="xl69" style="border-top:none;border-left:none" align="right">[SIZE=1]3[/SIZE]</td></tr> </tbody></table>
Here is my messy code attempt - I think it would maybe work but 6 nested loops is painful and a dumb way to do it.
Code:
Sub extractdata()

    Dim myRow As Integer
    Dim myCol As Integer
    Dim header As Range
    Dim mis As Range
    Dim veh As Range
    Dim T_header As Range
    Dim T_veh As Range
    Dim T_mis As Range

    For Each veh In ActiveSheet.Range("C:C").Cells
    For Each T_veh In ActiveSheet.Range("N2:W2").Cells
        For Each mis In ActiveSheet.Range("B:B").Cells
        For Each T_mis In ActiveSheet.Range("L:L").Cells
            For Each header In ActiveSheet.Range("A:A").Cells
            For Each T_header In ActiveSheet.Range("M:M").Cells
            
                If (veh.Value = T_veh.Value) Then
                    myCol = T_veh.Column
                    If (mis.Value = T_mis.Value) Then
                        If (header.Value = T_header.Value) Then
                            myRow = T_header.Row
                            ActiveSheet.Cells(myRow, myCol).Value = Cells(header.Row, 4)
                        End If
                    End If
                End If
                
            Next T_header
            Next header
        Next T_mis
        Next mis
    Next T_veh
    Next veh

End Sub
Thanks for your help - and let me know if more explanation is needed.

Austin
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top