Если у вас значительно больший размер данных , этот цикл по рабочему листу будет медленным. Вероятно, лучше получить все данные сразу и обработать их в памяти.
Option Explicit
Sub test_selection()
' My below array is based on values contained within
' selected cells
' The purpose of using two dimensional array is to
' keep values in one column of array
' while retaining cell addresses in 2nd
' dimension to print some info in relevant cells
' offset to the selected cells
Dim i As Long, r As Long, c As String, anArray As Variant
With Selection
c = Split(.Cells(1).Address, "$")(1)
r = Split(.Cells(1).Address, "$")(2) - 1
anArray = .Columns(1).Cells.Resize(.Rows.Count, 2).Value2
End With
For i = LBound(anArray, 1) To UBound(anArray, 1)
anArray(i, 1) = CStr(anArray(i, 1))
anArray(i, 2) = "$" & c & "$" & i + r
Next i
TestGetFileList anArray
End Sub