Erro VBA  - Excel?

Olá meus queridos, peço a ajuda de voces para solucionar uma situaçao.

Na minha planilha eu tenho uma forma na celula G2 e gostaria de replicar esta formula para as células de baixo (G3, G4, G5....) enquanto houver dados na coluna A. Assim que houver alguma linha em branco na coluna A, a ideia é que automaticamente parasse de executar o comando na coluna G.

meu codigo VBA está assim e não está dando certo:

Sub Test1()

'UpdatebyExtendoffice20161222

      Dim x As Integer

      Application.ScreenUpdating = False

      ' Set numrows = number of rows of data.

      Range("G2").Select

      Selection.Copy

      Range("G2").Select

      Do

      If ActiveCell <> "" Then

      ActiveCell.Offset(1, 0).Select

      End If

      Loop Until ActiveCell = ""

      ActiveCell.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _

        False, Transpose:=False

     Application.CutCopyMode = False

         ActiveCell.Offset(1, 0).Select

End Sub

Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Helpful Social

Copyright © 2024 QUIZLS.COM - All rights reserved.