Dim sh1 as Worksheet
Dim sh2 as Worksheet
Dim sh1x, sh2y as Ineteger 'You have to set sh1x to the column you want to check & sh2y to the row you want the data to be transfered to
Set sh1 = ActiveWorkbook.Sheets("Audit")
Set sh2 = ActiveWorkbook.Sheets("Wait Time")
If sh1.Cells(20, sh1x).Value > 1 or sh1.Cells(21, sh1x).Value > 1 then
sh2.Cells(sh2y, 1) = sh1.Cells(2, sh1x)
sh2.Cells(sh2y, 2) = sh1.Cells(3, sh1x)
sh2.Cells(sh2y, 3) = sh1.Cells(4, sh1x)
sh2.Cells(sh2y, 4) = sh1.Cells(5, sh1x)
sh2.Cells(sh2y, 5) = sh1.Cells(6, sh1x)
sh2.Cells(sh2y, 6) = sh1.Cells(7, sh1x)
sh2.Cells(sh2y, 7) = sh1.Cells(20, sh1x)
sh2.Cells(sh2y, 8) = sh1.Cells(21, sh1x)
End If
당신은 그것을 붙여 넣을 에. 이 작업을 자동으로 수행하려면 sh1x를 2로 설정하고 sh2y를 2로 설정하고 반복 할 때마다 sh1x 및 sh2y 값을 늘리는 루프를 만듭니다 (IF 이전 또는 이후 값을 반드시 늘리십시오).