So when I import data to my table it often has an erradict and unpredictable amount of columns which is fine except when I want to resize I would like to keep the first 8 columns of the table and delete any of the rest.
This works great below except my coulumns seem to keep the last 8 of the columns instead of the first 8.
Any guidance is appreciated.
oh and DCRPT is the "Named Table" I am using.
This works great below except my coulumns seem to keep the last 8 of the columns instead of the first 8.
Any guidance is appreciated.
oh and DCRPT is the "Named Table" I am using.
Code:
With DCRPT.DataBodyRange
If .Rows.Count > 1 Then
.Offset(1, 0).Resize(.Rows.Count - 1, .Columns.Count - 8).Rows.Delete
End If
End With