1
スプレッドシートに3つのワークシートがあります。私は最後のデータ行まで特定の行からコピーして、第二、第三のワークシートに貼り付けたい(第二、第三 - 最初のワークシートとは異なる行数)異なるシートの行をコピーする - 異なる行VBマクロ
Dim Source As Worksheet
Dim Source As Worksheet
Dim Target As Worksheet
Dim Target1 As Worksheet
Dim LastRow As Long
Dim FirstRow2Copy As Long
Dim FirstRowCQuote As Long
Dim FirstRowIQuote As Long
Dim CQFCell As Excel.Range
Dim IQFCell As Excel.Range
Set Source = ActiveWorkbook.Worksheets("myWorksheet1")
Set Target = ActiveWorkbook.Worksheets("mysheet1")
Set Target1 = ActiveWorkbook.Worksheets("mysheet2")
With Source 'Worksheets("myWorksheet1") Last row
LastRow = .Cells(.Rows.Count, "H").End(xlUp).Row '.Cells(.Rows.Count, "A").End(xlUp).Row
End With
Set FoundCell = ws.Range("A:A").Find(what:="Enter the Quantity items:", lookat:=xlWhole)
If Not FoundCell Is Nothing Then
'Need to copy from this first row to last row
FirstRow2Copy = FoundCell.Row + 1
End If
Set CQuoteFCell = Target1.Range("A:A").Find(what:="Enter the Quantity items:", lookat:=xlWhole)
If Not CQuoteFCell Is Nothing Then
FirstRowCQuote = CQuoteFCell.Row + 1
End If
Set IQuoteFCell = Target1.Range("A:A").Find(what:="Enter the Quantity items:", lookat:=xlWhole)
If Not IQuoteFCell Is Nothing Then
FirstRowIQuote = IQuoteFCell.Row + 1
End If
'Need to copy rows from FirstRow2Copy untill LastRow - where paste them in Target sheet from RowNumber:FirstRowCQuote,
'Paste the same rows in Target1 sheet from RowNumber:FirstRowIQuote
私はmysheet1の行から特定の持っていた場合
を、mysheet2ペーストするには、これはここでできますか?私の質問を参照してください – Signa
@Signa私は変更を加えましたが、回答が投稿された後、あなたの質問を根本的に変更しないでください。これは答えが何とか異常に見えるようにします。 –
ASHさん、ありがとうございました...ご迷惑をおかけして申し訳ありません – Signa