Determining if a range name exists

This function will return true if a named range exists

Private Function BET_RangeNameExists(nname) As Boolean 
Dim n As Name
    BET_RangeNameExists = False
    For Each n In ActiveWorkbook.Names
        If UCase(n.Name) = UCase(nname) Then
            BET_RangeNameExists = True
            Exit Function
        End If
    Next n
End Function


© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext