Har du set hvor smart det kan være?

Microsoft Office, Word skabeloner, Excel regnearkSmart Office Word skabelon system

SmartOffice - MergeAllSheetsIntoOne

Hvis du har brug for at samle dine data fra alle ark ind i et ark, så er her et hint.



Eksempel 1

Public Sub MergeUsedRangesIntoOneSheet()
    'Flemming Vadet, September 2003, fv@smartoffice.dk
    Dim lCount As Long
    Dim wksAct As Worksheet
    Dim lRow As Long

    Set wksAct = ActiveWorkbook.Sheets.Add(Before:=ActiveWorkbook.Sheets(1))
    Application.ScreenUpdating = False

    With ActiveWorkbook
        For lCount = 1 To .Worksheets.Count
            If Not (lCount = wksAct.Index) Then
                .Worksheets(lCount).UsedRange.Copy
                With wksAct
                    lRow = .UsedRange.Rows.Count + 3
                    .Cells(lRow, 1).PasteSpecial Paste:=xlPasteAll
                End With
            End If
        Next lCount
    End With

    ' CleanUp'
    With Application
        .CutCopyMode = False
        .ScreenUpdating = False
    End With
    Set wksAct = Nothing
End Sub
Enjoy *SS*

   

Smart Office Freeware Smart Data Management
Compare 2 Columns
Excel Super- Subscript
Teachers Excel Tools
         
Smart Office - Word og Excel specialist