ブックのブック内の列を検索し、ロータのブックにコピーします。私が持っている問題は、それも(最初の行)列ヘッダーをコピーしているということです。以下のコードに基づいて、列ヘッダーを含む最初の行を除外する方法に関する提案はありますか?vba - 列のタイトル以外のすべてのデータをコピーします。
私は「NUM」という名前の列全体をコピーするのではなく、最初の行をコピーしないように指定する必要があります以下の点でその推測を' find the column in the people workbook
name = WorksheetFunction.Match("name", people.Sheets("Open").Rows(1), 0)
num = WorksheetFunction.Match("num", people.Sheets("Open").Rows(1), 0)
'find the next empty row
Dim lastrow As Integer
lastrow = rota.Sheets("Offer").Range("A" & Rows.Count).End(xlUp).Row + 1
' copy from the people workbook into the next free space in rota workbook
people.Sheets("Open").Columns(name).Copy Destination:=rota.Sheets("Offer").Range("A" & Rows.Count).End(xlUp).Offset(1)
people.Sheets("Open").Columns(num).Copy Destination:=rota.Sheets("Offer").Range("B" & lastrow)
イム...
people.Sheets("Open").Columns(num).Copy Destination:=rota.Sheets("Offer").Range("B" & lastrow)
チェックこのアウト:http://superuser.com/questions/42304/select-an-entire-column-minus-header-row-in-an-excel-macroだけにあなたの最後の部分を変更します – Vityata