Jump to content

Ciclos VBA Excel


Recommended Posts

boa tarde,

não costumo mexer no vba e por isso as minhas dúvidas.

estou a tentar fazer uma macro com o seguinte procedimento...

consigo fazer para uma linha, mas não sei como o fazer, para correr todas as linhas da folha.

podem pf dar-me uma ajuda? obrigado.

Sub valorrecursos()

'

' valorrecursos Macro

'

' Atalho por teclado: Ctrl+r

'

ActiveCell.FormulaR1C1 = "=+R[-4]C[4]"

' "iguala E12 a 0"

Range("L5").Select

Selection.Copy

' "copia de L5"

Range("L12").Select

Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _

:=False, Transpose:=False

' "cola em L12"

Range("T12").Select

Application.CutCopyMode = False

Selection.Copy

' "copia de T12"

Range("E12").Select

Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _

:=False, Transpose:=False

' "cola em E12"

End Sub

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.