0820名無しさん@そうだ選挙にいこう2018/10/30(火) 17:24:06.12>>819 Sub 探すで() Dim Y1 As Long Dim Y2 As Long Dim X As Long Dim r As Range Const START_ROW As Long = 5 Const COPY_MAX_COL As Long = 20
On Error GoTo eH Application.ScreenUpdating = False For Y1 = START_ROW To Sheet1.Cells(START_ROW, 1).End(xlDown).Row '、空白でストップ Set r = Sheet2.Columns(1).Find(Sheet1.Cells(Y1, 1).Value, , , xlWhole) 'A列で探す If Not (r Is Nothing) Then Y2 = r.Row Sheet2.Range(Sheet2.Cells(Y2, 2), Sheet2.Cells(Y2, COPY_MAX_COL)).Copy Sheet1.Cells(Y1, 2).PasteSpecial xlPasteValues End If Next Y1 eH: Application.ScreenUpdating = True End Sub 0821名無しさん@そうだ選挙にいこう2018/10/30(火) 17:25:34.79 sheet2 = Sheet1(1) で。 あ、不細工やらかしてるけど、動く動く。