Hello guys,
I would like to get a cell address in the following format: "string + long". The first idea was to use the replace function
. Even it seems a bit puerile it works. To be more specific I post the code below:
Option Base 1
Sub Macro1()
Dim i As Long, k As Long, R As Long, myRows() As String
ReDim myRows(R)
R = ActiveSheet.UsedRange.Rows.Count
For i = 1 To R
If condition = True Then
k = k + 1
myRows(k) = Replace(Range("A" & i).Address, "$", vbNullString)
End If
Next i
ReDim Preserve myRows(k)
End Sub
Do you know other solutions to solve better this small exercise ? Thanks in advance.
Bookmarks