Dear All,

Please see below my code which looks at two ranges find initials beginning with a % and lists them in a userform. The code works fine except if the rows are hidden it does not pickup the value. Is there a parameter i can change or add?

Sub AnnualLeave()
Dim WS As Worksheet:    Set WS = Sheets("2016")
Dim LR As Long
Dim r As Range, rng As Range
Dim sAddr As String

ListBox1.ColumnCount = 2
ListBox1.ColumnWidths = "50;40"

LR = WS.UsedRange.Rows(WS.UsedRange.Rows.Count).Row
Set rng = Union(WS.Range("X4:NZ48"), WS.Range("X57:NZ77"))
Set r = rng.Find("%" & TextBox1.Value, , xlValues, xlPart, xlByColumns)
If Not r Is Nothing Then
    sAddr = r.Address
    Do
        ListBox1.AddItem
        ListBox1.List(ListBox1.ListCount - 1, 0) = WS.Cells(3, r.Column).Value
        ListBox1.List(ListBox1.ListCount - 1, 1) = r.Value
        Set r = rng.FindNext(r)
    Loop While Not r Is Nothing And r.Address <> sAddr
End If

End Sub