Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
So I rewrote my interpolation function to take in input as a numeric array
that can be either in Option Base 0 or 1. It is a Variant. Is there some way I can tell if this input is a range instead of numeric? Then I can convert it to values and make this new function also handle the argument that the exisiting function takes. And so replace it. Don <donwiss at panix.com. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Don,
Sub test() Dim var As Variant var = CDbl(123.456) ' Set var = Range("A1") If TypeOf var Is Range Then MsgBox "It's a range" Else MsgBox "It's not a range" End Sub Rob "Don Wiss" wrote in message ... So I rewrote my interpolation function to take in input as a numeric array that can be either in Option Base 0 or 1. It is a Variant. Is there some way I can tell if this input is a range instead of numeric? Then I can convert it to values and make this new function also handle the argument that the exisiting function takes. And so replace it. Don <donwiss at panix.com. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Rob van Gelder wrote:
Sub test() Dim var As Variant var = CDbl(123.456) ' Set var = Range("A1") If TypeOf var Is Range Then MsgBox "It's a range" Else MsgBox "It's not a range" End Sub Thanks! It worked like a charm in XP. I couldn't find where "TypeOf var Is Range" comes from. It will also have to work under 97. Don <donwiss at panix.com. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Look under help for IF
(see the options under condition). It is supported in Excel 97. -- Regards, Tom Ogilvy Don Wiss wrote in message ... Rob van Gelder wrote: Sub test() Dim var As Variant var = CDbl(123.456) ' Set var = Range("A1") If TypeOf var Is Range Then MsgBox "It's a range" Else MsgBox "It's not a range" End Sub Thanks! It worked like a charm in XP. I couldn't find where "TypeOf var Is Range" comes from. It will also have to work under 97. Don <donwiss at panix.com. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I assign range to variant and use | Excel Discussion (Misc queries) | |||
TESTING A RANGE OF CELLS | New Users to Excel | |||
TESTING A RANGE OF CELLS | Excel Worksheet Functions | |||
Testing a person's age to be within a range | Excel Worksheet Functions | |||
Testing for existence of range | Excel Programming |