Would like to iterate each row in a selection in excel VBA.
I have:
Dim rng As Range
Dim s As String
Set rng = Application.Selection
Debug.Print \"c
A general solution to looping through a range of cells in Excel:
Sub LoopSelection()
Dim cel As Range
Dim selectedRange As Range
Set selectedRange = Application.Selection
For Each cel In selectedRange.Cells
Debug.Print cel.Address, cel.Value
Next cel
End Sub
Iterates from top-left most cell, across then down.