Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to test whether the active cell is numeric or
not. I use the following code and it tells me that IsNumber is not a valid sub or function. Can somebody tell me what I am doing wrong? If IsNumber(ActiveCell.Offset(0, Y - 1).Value) Then MsgBox ("True") End If Thank you, Brady Snow McKinney, Texas |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
try If IsNumeric(....) then -- Regards Frank Kabel Frankfurt, Germany Brady Snow wrote: I am trying to test whether the active cell is numeric or not. I use the following code and it tells me that IsNumber is not a valid sub or function. Can somebody tell me what I am doing wrong? If IsNumber(ActiveCell.Offset(0, Y - 1).Value) Then MsgBox ("True") End If Thank you, Brady Snow McKinney, Texas |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "Brady Snow" wrote in message ... I am trying to test whether the active cell is numeric or not. I use the following code and it tells me that IsNumber is not a valid sub or function. Can somebody tell me what I am doing wrong? If IsNumber(ActiveCell.Offset(0, Y - 1).Value) Then MsgBox ("True") End If Thank you, Try IsNumeric instead of IsNumber Keith |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you want to know if it can be interpreted as a number, use IsNumeric
If IsNumeric(ActiveCell.Offset(0, Y - 1).Value) Then if you want to know if excel is storing it as a number If Application.IsNumber(ActiveCell.Offset(0, Y - 1).Value) Then -- Regards, Tom Ogilvy "Brady Snow" wrote in message ... I am trying to test whether the active cell is numeric or not. I use the following code and it tells me that IsNumber is not a valid sub or function. Can somebody tell me what I am doing wrong? If IsNumber(ActiveCell.Offset(0, Y - 1).Value) Then MsgBox ("True") End If Thank you, Brady Snow McKinney, Texas |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Tom Ogilvy" wrote...
if you want to know if excel is storing it as a number If Application.IsNumber(ActiveCell.Offset(0, Y - 1).Value) Then .... I wonder if VarType would be faster? If VarType(ActiveCell.Offset(0, Y - 1).Value2) = 5 Then |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
My guess would be yes.
Good addition. Thanks, Tom Ogilvy "Harlan Grove" wrote in message ... "Tom Ogilvy" wrote... if you want to know if excel is storing it as a number If Application.IsNumber(ActiveCell.Offset(0, Y - 1).Value) Then ... I wonder if VarType would be faster? If VarType(ActiveCell.Offset(0, Y - 1).Value2) = 5 Then |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
ISNUMBER | Excel Discussion (Misc queries) | |||
If, And, Isnumber statement | Excel Discussion (Misc queries) | |||
ISNUMBER | Excel Worksheet Functions | |||
ISNUMBER | Excel Worksheet Functions | |||
ISNUMBER | Excel Worksheet Functions |