Jump to content

[Resolvido] Juntar sheets


Recommended Posts

Boa tarde!!

Exemplo...

Sub AleVBA_63644()
Dim ws As Worksheet, ws1 As Worksheet, LR As Long
Set ws1 = Sheets("Mestre")
If MsgBox("Limpar os dados existentes da guia Tabela Dinâmica?", vbYesNo, "Confirmação") = vbYes Then ws1.Cells.Clear
For Each ws In Worksheets
   If ws.Name <> ws1.Name Then
    LR = ws.Range("B" & Rows.Count).End(xlUp).Row
    'O intervalo que deseja copiar de cada guia
    ws.Range("B11:K" & LR).Copy ws1.Range("A" & Rows.Count).End(xlUp).Offset(1)
   End If
Next ws
End Sub
Link to comment
Share on other sites

Obrigado, pela solucao vou testar mais tarde.

Neste caso acabei por solucinar o problema standarizando todos os forms, ou seja, todos com o mesmo numero de linhas e colunas, alturas e larguras de celulas iguais, tornando-se assim mais facil de trabalhar.

Contudo obrigado pela solucao, irei testar brevemente e passar o feedback da mesma,

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.