Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Programming
Reconstructing a table with Arrays
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Wouter HM, post: 6441662"] 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. [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Programming
Reconstructing a table with Arrays
Top