To increase the size of the array or columns is not an issue, but the value of the category column appears to change (As per the desired output), so I do not know how you are going to get these values?
There are many ways of adjusting the array. Quick and dirty fix which does not require looping, but inflexible is:
ReDim a(1 To 100000, 1 To 8)
For Each oElement In oHtml.getElementsByClassName("snapshot")
i = i + 1
x = Split(oElement.outerText, vbCr)
a(i, 1) = nowDate
a(i, 2) = nowTime
a(i, 3) = website
a(i, 4) = cat
a(i, 5) = Trim$(x(1))
a(i, 6) = Trim$(x(2))
a(i, 7) = Trim$(x(3))
Next oElement
Sheets("Sheet1").Cells(2, 1).Resize(i, UBound(a, 2)) = a
Another option:
ReDim a(1 To 100000, 1 To 8)
For Each oElement In oHtml.getElementsByClassName("snapshot")
i = i + 1
x = Split(oElement.outerText, vbCr)
For ii = 1 To UBound(x)
a(i, 1) = nowDate
a(i, 2) = nowTime
a(i, 3) = website
a(i, 4) = cat
a(i, ii + 4) = Trim$(x(ii))
Next
Next oElement
Sheets("Sheet1").Cells(2, 1).Resize(i, UBound(a, 2)) = a
Bookmarks