Created
May 24, 2013 03:30
-
-
Save aptavout/5641120 to your computer and use it in GitHub Desktop.
Treat an Excel workbook as a 2-dimensional array, and iterate over it.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Range("A1").Select | |
Range(ActiveCell, ActiveCell.CurrentRegion).Select | |
For Each row In Selection.Rows | |
Dim rowStr As String | |
For Each col In Selection.Columns | |
rowStr = rowStr & Cells(row.Row, col.Column) | |
If col.Column < Selection.Columns.Count Then | |
rowStr = rowStr & "," | |
End If | |
Next | |
Next |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment