Display all worksheets in a sheet?

Horby

New Member
Joined
Jun 13, 2014
Messages
22
Hi,

Can I view all the worksheets in a sheet?

Display with some of the data of every sheet?

Example image
delete.png
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Below is the code I'm using to get all data in the consolidated sheet.

You can activate the macro using ALT + F8 and choose integratie_Oeldere_revisted_vs3()

Then choose run macro.

After that you can use a pivot table to analyze the data.

I now will upload the file and post the link here in this forum.

http://www.mijnbestand.nl/Bestand-4NCDILC7HZEA.xlsm


Code:
Sub integratie_Oeldere_revisted_vs3()

'I got a lot of help from AB33, to get this code working; thanks for that AB33.

Dim wsTest As Worksheet

'check if sheet "Consolidated" already exist

Const strSheetName As String = "Consolidated"
 
Set wsTest = Nothing
On Error Resume Next
Set wsTest = ActiveWorkbook.Worksheets(strSheetName)
On Error GoTo 0
 
If wsTest Is Nothing Then
    Worksheets.Add.Name = strSheetName
End If

With Sheets("Consolidated")
    .UsedRange.ClearContents
    .Range("A1:C1").Value = Array("sheet", "Value", "Descripson")
    For Each sh In Sheets
        With sh
            If .Name <> "Consolidated" And .Name <> "Summary" And .Name <> "Output" And .Name <> "PivotTable" Then
                 LR = .Cells(.Rows.Count, 1).End(xlUp).Row
                If LR >= 2 Then
                   Rng = .Cells.Find("*", , , , xlByRows, xlPrevious).Row - 1
                   NR = Sheets("Consolidated").Cells.Find("*", , , , xlByRows, xlPrevious).Row + 1
                   If Rng > 0 Then
                    Sheets("Consolidated").Cells(NR, 1).Resize(Rng) = .Name
                    Sheets("Consolidated").Cells(NR, 2).Resize(Rng, 8) = .Range("A2").Resize(Rng, 8).Value
                  End If
               End If
            End If
        End With
    Next
    On Error Resume Next
    .Range("C2:C" & .Rows.Count).SpecialCells(4).EntireRow.Delete
    .Columns("A:Z").EntireColumn.AutoFit
End With
End Sub
 
Upvote 0
In the code I changed this line

.Range("K2:K" & .Rows.Count).SpecialCells(4).EntireRow.Delete

After that a non VBA solution

O2
Code:
=INDIRECT("K"&(Row()-2)*5+Column()-13)

Maybe another member can do that with VBA.

Advice:

You work with merged cells, you get in trouble with it sooner o later.

I now will upload the file.

http://www.mijnbestand.nl/Bestand-Z86P4AALU8IY.xlsm
 
Upvote 0

Forum statistics

Threads
1,215,036
Messages
6,122,794
Members
449,095
Latest member
m_smith_solihull

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top