I have an excel product spreadsheet that has features (eight columns for features alone; the number of features per product differs), width, diameter, shackle clearance width and shackle clearance height columns.

Now, for each of these products, I need a new column that is populated from an html template like the following:

<style type="text/css">
h3.descript {
color: #880000;
font-family: Georgia, "Times New Roman", Times, serif
font-weight: normal;
font-size: 22px;
margin-bottom: 0.5em;
}
table.super {
text-align: center;
}
table.super {
border-collapse: collapse;
margin: 0 35px 1em;
}
.clear {
clear: both;
}
.abus td {
width:220px;
text-align: left;
padding:5px;
}
.abuscat {
font-weight:bold;
}

</style>
<h3 class="descript">Product Features:</h3>
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>

<h3 class="descript">Product Specifications:</h3>
<table class="clear super">
<tbody class="abus">
<tr>
<td><span class="abuscat">Width:</span></td>
<td>AB160</td>
</tr>
<tr>
<td><span class="abuscat">Shackle Diameter:</span></td>
<td>Y160</td>
</tr>
<tr>
<td><span class="abuscat">Shackle Clearance - Width:</span></td>
<td>AA160</td>
</tr>
<tr>
<td><span class="abuscat">Shackle Clearance - Height:</span></td>
<td>Z160</td>
</tr>
</tbody>
</table>

As you can see, the only things that need to be rendered into this column dynamically are the values of the <td> elements and the <li> elements.

Now, the <td>'s should be straightforward enough. My implementation is valid, is it not?

Just pull from the other columns in the same row.

But, for the features. Since there are differing numbers for each row (when a feature for a product is not there, that column is just blank [e.g. if product1 has three features, columns feature4-feature8 will be blank]) I'm thinking a for loop of some sort is in order.

Is this even possible with excel? Surely it is, but I don't know how to accomplish it.

Also, is the html in the formula going to be a problem? With all of the carrot characters and forward slashes.

Any help is appreciated!

Thanks!