
eu uso ms excel 2007
quero cortar uma linha na planilha 1 e depois colá-la na planilha 2 usando uma fórmula no excel já usei =VLOOKUP ou =A1 mas é só copiar os dados e não CORTAR
Obrigado por toda sua ajuda
Responder1
Você não pode fazer isso em uma fórmula, mas é mais do que capaz de fazer isso em VBA. Algo como:
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
Você também pode usar .EntireRow se for a linha completa que você está cortando.
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
Veja issolinksobre como usar o método .cut.