Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Bythsx-Addagio,
In Excel 2007 I have crated this macro Sub Adagio() Dim lastRow As Long Dim lastCol As Long Dim loopRow As Long Dim loopCol As Long Dim outputRow As Long lastRow = Cells(ActiveSheet.Rows.Count, 1).End(xlUp).Row lastCol = Cells(1, ActiveSheet.Columns.Count).End(xlToLeft).Column outputRow = 1 For loopRow = 2 To lastRow For loopCol = 2 To lastCol If Not IsEmpty(ActiveSheet.Cells(loopRow, loopCol)) Then outputRow = outputRow + 1 Sheets("Sheet2").Cells(outputRow, 1) = ActiveSheet.Cells(loopRow, 1) Sheets("Sheet2").Cells(outputRow, 2) = ActiveSheet.Cells(1, loopCol) Sheets("Sheet2").Cells(outputRow, 3) = ActiveSheet.Cells(loopRow, loopCol) End If Next Next End Sub HTH, Wouter. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Reconstructing a table | Excel Worksheet Functions | |||
Finding Duplicate Arrays in a table | Excel Discussion (Misc queries) | |||
Using text to lookup different table arrays in vlookup. | Excel Worksheet Functions | |||
VLookups Across Mulitple Table Arrays | Excel Discussion (Misc queries) | |||
arrays and pivot table | Excel Worksheet Functions |