Ir ao conteúdo
  • Cadastre-se

LEONARDOSILV

Membro Júnior
  • Posts

    1
  • Cadastrado em

  • Última visita

Reputação

0
  1. Olá, Tenho uma macro que deve copiar e colar sempre no mesmo destino de acordo com o valor do drop down. Ela funciona mas somente quando eu rodo manualmente. Gostaria que ela rodasse automaticamente assim que o valor do drop down for alterado. Ela esta assim: Sub CopyPaste1234() If Sheets("Sheet2").Range("C2").Value = 1 Then Sheets("Sheet1").Range("D4:D31").Copy Sheets("Sheet2").Select Range("P13").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False End If If Sheets("Sheet2").Range("C2").Value = 2 Then Sheets("Sheet1").Range("E4:E31").Copy Sheets("Sheet2").Select Range("P13").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False End If If Sheets("Sheet2").Range("C2").Value = 3 Then Sheets("Sheet1").Range("F4:F31").Copy Sheets("Sheet2").Select Range("P13").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False End If If Sheets("Sheet2").Range("C2").Value = 4 Then Sheets("Sheet1").Range("G4:G31").Copy Sheets("Sheet2").Select Range("P13").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False End If End Sub Agradeço se puderem ajudar

Sobre o Clube do Hardware

No ar desde 1996, o Clube do Hardware é uma das maiores, mais antigas e mais respeitadas comunidades sobre tecnologia do Brasil. Leia mais

Direitos autorais

Não permitimos a cópia ou reprodução do conteúdo do nosso site, fórum, newsletters e redes sociais, mesmo citando-se a fonte. Leia mais

×
×
  • Criar novo...