Este fórum está sendo desativado

Depois de 9 anos, este fórum será desativado. Mas calma.... estamos migrando para uma comunidade no DISCORD. Junte-se a nós.

ENTRAR PARA DISCORD

Dúvidas sobre cálculos, funções simples e aninhadas, fórmulas matriciais, etc.
Por jjairgomes
#35528
Bom dia
Encontrei essa macro:

Sub copiar()

Range("A1:A10").Select
Selection.Copy
Sheets("Plan2").Select
Range("A1").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

End Sub

Essa macro tem a seguinte função

A macro Copia (A1:A10) plan01
A macro cola na plan02 (A1:A10)
A macro Copia (A1:A10) plan01
A macro cola (A11:A20) plan02
Sempre na sequencia da primeria celula vazia.

Eu precisava que alem disso ela copiasse (C1:C10), (E1:E10) e colasse na (C1:C10), (E1:E10) na plan2

Espero que alguém me ajude!
Muito obrigado.
Por osvaldomp
#35530
Experimente:
Código: Selecionar todos
Sub ReplicaDados()
 Dim i As Long
  For i = 1 To 5 Step 2
   Sheets("Plan2").Cells(Rows.Count, i).End(3)(2).Resize(10).Value = Sheets("Plan1").Cells(1, i).Resize(10).Value
  Next i
End Sub
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]

Estamos migrando para uma comunidade no Discord