各列の行80で元のワークシートを調べ、 "True"というテキストがある場合は、その列をコピー先のワークシートにコピーします。その後、ループしてすべての列を通過します。私は列の幅をコピーする方法を見つけることができない限り、完璧に動作します。 - ヨルダンリサイズとコピーを使用して列の幅をコピーする
'Called from AddWorksheet
Sub CopyFinal(orgSheet As Worksheet, destSheet As Worksheet)
Dim j As Integer '**Why is j an Integer and others are Long?
Dim lastColumn As Long
Dim benRow As Long
j = 2
lastColumn = 2
'Counts the number of benefits on each sheet. Assumes that they will not go past row 40
benRow = WorksheetFunction.CountA(orgSheet.Range("B3:B40"))
Application.ScreenUpdating = False
Do Until IsEmpty(orgSheet.Cells(3, j))
If orgSheet.Cells(80, j) = True Then
orgSheet.Cells(3, j).Resize(benRow).Copy destSheet.Cells(3, lastColumn) '**Need to paste column widths
End If
j = j + 1
lastColumn = destSheet.UsedRange.Columns(destSheet.UsedRange.Columns.Count).Column + 1
Loop
Application.ScreenUpdating = True
End Sub
あなたが使用したい[ 'Range.ColumnWidth'](https://msdn.microsoft.com/en-us/library/office/ff837430.aspx) – BruceWayne