List_Excel_Columns_for_Every_Sheet (Excel VBA)

Sub List_Excel_Columns_for_Every_Sheet() 'Make a Sheet called "Stats" For SheetLooper = 1 To ActiveWorkbook.Sheets.Count - 1 Dim StatRowLooper As Integer: StatRowLooper = 1 Dim ColumnLooper As Integer: ColumnLooper = 1 Sheets("Stats").Cells(ColumnLooper, SheetLooper).Value = Sheets(SheetLooper).Range("A2").Value Do While ColumnLooper <= Sheets(SheetLooper).UsedRange.Columns.Count Sheets("Stats").Cells(ColumnLooper + 1, SheetLooper).Value = Sheets(SheetLooper).Cells(1, ColumnLooper).Value ColumnLooper = ColumnLooper + 1 Loop Next MsgBox "Done" End Sub

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.