Warme bakkertje
Meubilair
- Lid geworden
- 13 apr 2008
- Berichten
- 7.567
- Besturingssysteem
- Windows 10
- Office versie
- Office 2016 Prof Plus EN
Zonder enkele schoonheidsfoutjes.
Code:
Sub M_snb()
sn = Application.Transpose(ActiveSheet.UsedRange.Columns(1))
On Error Resume Next
Set tbl = ActiveSheet.ListObjects(1)
With tbl.DataBodyRange
.Resize(.Rows.Count, .Columns.Count).Rows.Delete
End With
With CreateObject("scripting.dictionary")
For j = 1 To UBound(sn) Step 10
.Item(.Count) = Array(sn(j), sn(j + 1), sn(j + 2), sn(j + 3), sn(j + 4), sn(j + 5), sn(j + 6), sn(j + 7), sn(j + 8), sn(j + 9))
Next
Cells(1, 4).Resize(.Count, 10) = Application.Index(.items, 0, 0)
With ActiveSheet.ListObjects.Add(xlSrcRange, ActiveSheet.Cells(1, 4).CurrentRegion, , xlYes)
.Name = "Tabel3"
.TableStyle = "TableStyleLight6"
End With
End With
End Sub