Ambiguous name

I have entered and ran debug on the function below:
Function NumberOut(rng As Range)
Dim i As Integer
For i = 1 To Len(rng)
Select Case Asc(Mid(rng.Value, i, 1))
Case 0 To 64, 123 To 197
Case Else
NumberOut = NumberOut & Mid(rng.Value, 1, 1)
End Select
Next i
End Function

Open in new window

However, when I try to execute the function in Excel, =NumberOut(A2:A7), I get an error "Ambiguous name"?
Is there a limitation on the number of modules in Excel that's keeping me from this?
Frank FreeseAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You probably have another Function or sub-routine by the same name somewhere in your file.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Frank FreeseAuthor Commented:
Let me check that
Frank FreeseAuthor Commented:
You nailed it! Thanks
Learn SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Frank FreeseAuthor Commented:
Thank you very much
Martin LissOlder than dirtCommented:
From the name of the UDF I would guess that you were trying to remove everything from the target cell except numbers, in other words produce 1237 from a123%^c7. But your code does the opposite. And if you do want to extract the numbers I would suggest just looking for Ascii values of 48 to 57 which are the numbers, since there are many more non-numeric characters.
Frank FreeseAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.