I have a table like this excel table and I want to create a Word Table to look like this
I am a novice user of VBA so this is genuinely killing me because I can't figure out how to make this happen.
My output so far has been this here. As you can see, I am nowhere near this and I would like some help on formatting it right.
My code is below:
Sub Rev2()
Dim objWord As Object
Dim objDoc As Object
Dim objSelection As Object
Dim wSheet As Worksheet
Dim excel_rows As Integer 'Excel r
Dim excel_cols As Integer 'Excel c
Dim word_rows As Integer 'Word R
Dim wRow As Integer
Dim wCol As Integer
Dim i As Integer
Set wSheet = ThisWorkbook.Worksheets("Sheet1")
wSheet.Activate
excel_rows = WorksheetFunction.CountA(Range("A1", Range("A1").End(xlDown)))
excel_cols = WorksheetFunction.CountA(Range("A1", Range("A1").End(xlToRight)))
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Add
Set objSelection = objWord.Selection
objWord.Visible = True
objWord.Activate
word_rows = (excel_rows * 3)
Set overstockTable = objDoc.Tables.Add(objSelection.Range, word_rows, 1)
With overstockTable
.Borders.Enable = True
.Range.Font.Bold = True
'Split every 3rd cell into 3 columns
For i = 1 To word_rows
If i Mod 3 = 0 Then
.Cell(i, 1).Split NumColumns:=3
End If
Next i
'Transfer data
For wRow = 1 To word_rows
Debug.Print ("wRow is " & wRow)
If wRow Mod 3 <> 0 Then
'Read the active cell from excel and transfer it to the word table
.Cell(wRow, 1).Range.InsertAfter wSheet.Cells(ActiveCell.row, ActiveCell.Column).Text
.Cell(wRow, 1).Range.ParagraphFormat.Alignment = wdAlignParagraphCenter
ActiveCell.Offset(0, 1).Select
Else
For wCol = 1 To 3
.Cell(wRow, wCol).Range.InsertAfter wSheet.Cells(ActiveCell.row, ActiveCell.Column).Text
.Cell(wRow, wCol).Range.ParagraphFormat.Alignment = wdAlignParagraphCenter
ActiveCell.Offset(0, 1).Select
If wCol Mod 3 = 0 Then
ActiveCell.Offset(1, -5).Select
End If
Next wCol
End If
Next wRow
End With
End Sub
Problems I encounter:
- Reading the Databody only. I don't know how to start reading from A2 and below. I use offset when pasting data from the excel to the word document. I am hoping to know if there's a better way to do this.
- Paragraph Formatting inside the cells. I have been trying to center align all the cells in the word document instead of the default left-align. In my code you will notice while I am transferring the data, that I try to align the cells, but it doesn't work and I have no idea why.
Any tips will be greatly appreciated. Thank you in advance!

Overstock Location. Please try the script in my post below and let me know if the output matches your expectations.