View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_5_] Bob Phillips[_5_] is offline
external usenet poster
 
Posts: 620
Default Is range a valid address?

Function IsRange(inRange) As Boolean
IsRange = TypeName(inRange) = "Range"
End Function


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"pk" wrote in message
...

Hello, hope someone can help?

I need a bullet proof function to which I can send a
variable to see whether it contains a valid cell/range
address.

As you all know range addresses may vary quite a bit:

A:A
$1:8
C$5
R27:$AC$4759

etc.

Perhaps in another function, to test if a variable
contains a valid named range?

Your example code would be most appreciated. Thanks in
advance.