Olá amigos.
Estou com um problema:
Como crio uma macro para que eu possa pegar o CD_SUP e o SUP (nome) e colar nas linhas acima, na coluna D e E.
O numero de linhas podem variar e de SUP também como a imagem abaixo.
Podem me ajudar?
Criei a seguinte macro e não funcionou:
Sub Macro10() Range("D2").Select Selection.End(xlDown).Select Range("D18:E18").Select Selection.Copy Range(Selection, Selection.End(xlUp)).Select Range("D2:E18").Select Range("D18").Activate ActiveSheet.Paste Selection.End(xlDown).Select Range("D20:E20").Select Application.CutCopyMode = False Selection.Copy Range(Selection, Selection.End(xlUp)).Select ActiveSheet.Paste Selection.End(xlDown).Select Range("D22:E22").Select Application.CutCopyMode = False Selection.Copy Range(Selection, Selection.End(xlUp)).Select ActiveSheet.Paste Selection.End(xlDown).Select Range("D57:E57").Select Application.CutCopyMode = False Selection.Copy Range(Selection, Selection.End(xlUp)).Select ActiveSheet.PasteEnd Sub