I would like to take advantage of the Excel Tables.
But I can't solve this task:
I copy certain content from my Active Sheet to the clipboard:
Now I intend to paste that data into a new row of a Table that is on another Sheet.
To access the table and add a new row to it, I use:
So far it works fine.
Now the problem is how to Paste the content of the clipboard in that created row.
The idea is to use something like:
But I found that to use PasteSpecial I have to resign the advantages of the Table and treat it as a "common range", using a code like this:
But I can't solve this task:
I copy certain content from my Active Sheet to the clipboard:
VBA Code:
Range("F3:F19").Copy
Now I intend to paste that data into a new row of a Table that is on another Sheet.
To access the table and add a new row to it, I use:
VBA Code:
Range("TableName").ListObject.ListRows.Add
So far it works fine.
Now the problem is how to Paste the content of the clipboard in that created row.
The idea is to use something like:
VBA Code:
PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=True
But I found that to use PasteSpecial I have to resign the advantages of the Table and treat it as a "common range", using a code like this:
VBA Code:
Sheets("NameSheetWithTable").Select
Range("B3").Select 'would be the upper left cell of the Table
Selection.End(xlDown).Select
If ActiveCell.Value <> "" Then ActiveCell.Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=True
Last edited by a moderator: