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

Tópicos relacionados a códigos VBA, gravação de macros, etc.
#35767
BOA TARDE ESTOU TENTANDO CRIAR UMA PLANILHA DE VENDAS QUE BAIXA O ESTOQUE ENCONTREI ESSA MACRO NA NET, FIZ ALGUMAS ALTERAÇOES MAS NAO CHEGUEI AO RESULTADO QUE EU QUERIA, SEGUE A MACRO:

Sub copiar()

Range("C14:C214").Select
Selection.Copy
Sheets("SAÍDA").Select
Range("A3").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 (C14:C214) plan01
A macro cola na plan SAIDA (A2:A214)
A macro Copia (C14:C214) plan01
A macro cola (A215:A300) plan02
Sempre na sequencia da primeria celula vazia.

Eu precisava que ela copiasse (B14:B214)Planvenda, colasse (A3:A214)PLAN SAIDA
copiasse (C14:C214) Planvenda, colasse (B3:B214)PLAN SAIDA
(H14:H216)Planvenda, colasse na (C3:C200) PLAN SAIDA
copiasse (I16:I216)Planvenda e colasse (D2:D200) na PLAN SAÍDA
#35768
Experimente:
Código: Selecionar todos
Sub ReplicaDados()
 With Sheets("PLAN SAIDA")
 .[A3].Resize(201).Value = Sheets("Planvenda").[B14:B214].Value
 .[B3].Resize(201).Value = Sheets("Planvenda").[C14:C214].Value
 .[C3].Resize(201).Value = Sheets("Planvenda").[H14:H214].Value
 .[D3].Resize(201).Value = Sheets("Planvenda").[I14:I214].Value
 End With
End Sub
obs. considerei todos os intervalos a copiar linhas 14:214 e colar na linha 3, ajuste se necessário
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