Mover dados entre abas e excluir a linha.
Enviado: 21 Ago 2021 às 13:40
Boa tarde!
Solicito a sua ajuda conforme o anexo.
Grato.
Solicito a sua ajuda conforme o anexo.
Grato.
Fórum de Dúvidas sobre Excel e Power BI
https://gurudoexcel.com/
Sub Teste()
Dim c As Range
For Each c In Range("A2:A" & Cells(Rows.Count, 1).End(3).Row)
If c.Value = "T" Then c.Resize(, 16).Cut Sheets("DESTINO").Cells(c.Row, 1)
Next c
[A1] = "hdr"
Columns(1).SpecialCells(xlCellTypeBlanks).EntireRow.Delete
[A1] = ""
End Sub
GENECI escreveu: ↑23 Ago 2021 às 11:02 ... quando constar a letra T, após teclar o enter automaticamente transferir o conteúdo para a aba DESTINO ...Desconsidere o código que postei antes e cole uma cópia do código abaixo no módulo da planilha ORIGEM.
Essa explicação muda tudo.![]()
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Column > 1 Then Exit Sub
If Target.Value = "T" Then Cells(Target.Row, 1).Resize(, 16).Cut Sheets("DESTINO").Cells(Target.Row, 1)
Rows(Target.Row).Delete
End Sub