Hello guys,
I have a problem with selection.end. Let me share a piece of the code
SourceRange is from A2 to A120 but i m getting N/A printed in all rows below B120 qnd then Excel stop responding. Seems like it's unlimited loop.
How can i be sure that Selection.End(xlDown) is 120 and not unlimited? Do you see any issue with the code above?
Thanks for the help.
I have a problem with selection.end. Let me share a piece of the code
VBA Code:
Dim cell As Range
Dim sourceRange As Range
Set sourceRange = Range(wsJiraReport.Range("A2"), Selection.End(xlDown))
For Each cell In sourceRange
MyRelease = Application.Match(wsJiraReport.Range("A" & cell.Row), MatchFind, 0)
If IsError(MyRelease) Then
wsJiraReport.Range("B" & cell.Row).Value = "N/A"
Else
wsJiraReport.Range("B" & cell.Row).Value = Application.WorksheetFunction.Index(IndexPrint, MyRelease)
End If
Next
SourceRange is from A2 to A120 but i m getting N/A printed in all rows below B120 qnd then Excel stop responding. Seems like it's unlimited loop.
How can i be sure that Selection.End(xlDown) is 120 and not unlimited? Do you see any issue with the code above?
Thanks for the help.
Last edited: