Making a 2 columned, 4 row table in a single cell for multiple row

U

urlocaljeweler

I am using Excel 2007.

I have 5 columns as illustrated below - (Table Description has no rows yet)

CTwt. Size Metal Jewelers cost Table Description

5 10 Tungsten 31
4 10.5 Tungsten 35
2 11 Tungsten 50
10 11.5 Tungsten 20
8 12 Tungsten 15
5 12.5 Tungsten 50
6 13 Tungsten 45

What I need to accomplish: Column 5(Table Description) needs to be a table
in each row. For example Column 5, Row 1: (new table with 2 columns and 4
rows) like this:

Ctwt. 5
Size 10
Metal Tungsten
Jewelers Cost 31

I need to do this with hundreds of rows. After this I will somehow convert
the table into html format and upload the excel file to my webpage....

Any ideas?

Thank you.
 
P

p45cal

See if this does it for you (it assumes the first column of the table i
in column A). This code was used with your table (including headers) an
your data in the range A1:E8:

Code
-------------------
Sub blah2()
TitleRow = 1 'adjust yourself
TopRowOFData = 2 'adjust yourself
BottomRowOfData = 8 'adjust yourself
Cells(TitleRow, 5).Resize(, 2).Merge
For i = BottomRowOfData To TopRowOFData Step -1
Cells(i, 1).Offset(1).Resize(3, 6).Insert
Cells(i, 6).Resize(4) = Application.Transpose(Cells(i, 1).Resize(, 4).Value)
Cells(i, 5).Resize(4) = Application.Transpose(Cells(TitleRow, 1).Resize(, 4).Value)
For j = 1 To 4
With Cells(i, j).Resize(4)
.Merge
.VerticalAlignment = xlCenter
End With
Next j
Next i
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top