Consulting

Results 1 to 6 of 6

Thread: insert name of tabs that had data copied in master tab

  1. #1

    insert name of tabs that had data copied in master tab

    How insert name tab in cell?

    Look code and file model
    Attached Files Attached Files

  2. #2
    Hellow, somenone understand my question?

    i can explain again...

  3. #3
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    impatient aren't we?
    Don't know what you want so perhaps you'd better 'explain' since that was missing.
    Just a guess:
    Sub Copy_Sheets()
    Dim ws As Worksheet
    Dim lr As Integer
    Application.ScreenUpdating = False
    For Each ws In Sheets(Array("dante doc", "alan doc", "bruno doc", "aline doc"))
      With ws
        .Range("B8:D18").Copy
        With Worksheets("summary doc").Range("B" & Cells(Rows.Count, 2).End(xlUp).Row + 1)
          .PasteSpecial (xlPasteValues)
          .Offset(, -1).Value = ws.Name
        End With
      End With
    Next ws
    Application.CutCopyMode = False
    Application.ScreenUpdating = True
    End Sub
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  4. #4
    Hi, thnaks for rep

    you cide make it
    Nome relatorio Numero Local
    dante doc Campo 1 Rua da Alegria
    Tecnico 13 Porão
    alan doc 151515 4234zfdsf1323 Rua Vladimir Sinkus
    151516 4234zfdsf1324 Rua Bottivinl
    bruno doc 10101010101 252525252 Rua da Gambiarra
    aline doc 22222222 99999999999 Rua de Medicina
    22222223 99999999910 Rua Bazlio
    22222224 99999999911 Rua de Carlito

    I need this way
    Nome relatorio Numero Local
    dante doc Campo 1 Rua da Alegria
    dante doc Tecnico 13 Porão
    alan doc 151515 4234zfdsf1323 Rua Vladimir Sinkus
    alan doc 151516 4234zfdsf1324 Rua Bottivinl
    bruno doc 10101010101 252525252 Rua da Gambiarra
    aline doc 22222222 99999999999 Rua de Medicina
    aline doc 22222223 99999999910 Rua Bazlio
    aline doc 22222224 99999999911 Rua de Carlito


    thank you!!

  5. #5
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    try:
    Sub Copy_Sheets()
        Dim ws As Worksheet
        Dim lr As Integer
        Application.ScreenUpdating = False
        For Each ws In Sheets(Array("dante doc", "alan doc", "bruno doc", "aline doc"))
            With ws
                Set SourceRng = .Range("B8").CurrentRegion
                Set SourceRng = SourceRng.Offset(1).Resize(SourceRng.Rows.Count - 1)
                SourceRng.Copy
                With Worksheets("summary doc").Range("B" & Cells(Rows.Count, 2).End(xlUp).Row + 1)
                    .PasteSpecial (xlPasteValues)
                    .Offset(, -1).Resize(SourceRng.Rows.Count).Value = ws.Name
                End With
            End With
        Next ws
        Application.CutCopyMode = False
        Application.ScreenUpdating = True
    End Sub
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  6. #6
    Hi. solved, very good!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •