
저는 MS Excel 2007을 사용합니다
시트 1에서 행을 잘라낸 다음 Excel의 수식을 사용하여 시트 2에 붙여넣고 싶습니다. 이미 =VLOOKUP 또는 =A1을 사용했지만 데이터만 복사하고 잘라내지는 않습니다.
모든 도움에 감사드립니다
답변1
수식에서는 이 작업을 수행할 수 없지만 VBA에서는 수행할 수 있는 것 이상입니다. 다음과 같은 내용이 있습니다.
Sub cut()
Set sh1 = Sheets("Sheet1") 'change your sheet names if they are different
Set sh2 = Sheets("Sheet2")
sh1.Range("A1:H1").cut sh2.Range("A1:H1") 'Select the range you are cutting from and where it being pasted
End Sub
잘라내려는 전체 행인 경우 .EntireRow를 사용할 수도 있습니다.
Sub cut()
Set sh1 = Sheets("Sheet1") 'change your sheet names if they are different
Set sh2 = Sheets("Sheet2")
sh1.Range("A1").EntireRow.cut sh2.Range("A1")
End Sub
이것을 확인해보세요링크.cut 메소드를 사용하는 방법에 대해 알아보세요.