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.
Por Rborges007
#38071
Boa tarde amigos,

Tenho um documento no excel, onde faço cadastro de alguns funcionários, queria que na plan (Gerar documento) só copiasse os dados das colunas A2:H2 e colassem até A6:H6, SE (IF) na plan (Cadastro) tivesse algum valor na coluna A3 ou A4 ou A5 ou A6.

Consegui explicar direitinho?



Eu preciso que só copiei na plan (Gerar documento) os dados da coluna A2:H2 e colem no A3:H3 se na plan (Cadastro) tivesse algum valor na coluna A3 e assim por diante.



Segue em anexo o documento.





To usando o seguinte código: 'Copiar e colar dados do Gerar Documento
Sheets("GERAR DOCUMENTO").Select
Range("A2:H2").Select
Selection.Copy
Sheets("GERAR DOCUMENTO").Select
Range("A3:H3").Select
ActiveSheet.Paste

Sheets("GERAR DOCUMENTO").Select
Range("A2:H2").Select
Selection.Copy
Sheets("GERAR DOCUMENTO").Select
Range("A4:H4").Select
ActiveSheet.Paste

Sheets("GERAR DOCUMENTO").Select
Range("A2:H2").Select
Selection.Copy
Sheets("GERAR DOCUMENTO").Select
Range("A5:H5").Select
ActiveSheet.Paste

Sheets("GERAR DOCUMENTO").Select
Range("A2:H2").Select
Selection.Copy
Sheets("GERAR DOCUMENTO").Select
Range("A6:H6").Select
ActiveSheet.Paste

Application.CutCopyMode = False





Mas preciso que entre essa condição que pedi nele.....
Você não está autorizado a ver ou baixar esse anexo.
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