Hi
If ActiveCell.Offset(0, 7).Value = ISNUMBER Then
ActiveCell = "False"
End If
What is wrong here?
Hi
If ActiveCell.Offset(0, 7).Value = ISNUMBER Then
ActiveCell = "False"
End If
What is wrong here?
Hi Ctech
Try this
If ISNUMBER(ActiveCell.Offset(0, 7).Value) Then
ActiveCell = "False"
End If
Regards Yngve
I get error "Sub of function not known".
Try this:
If IsNumeric(ActiveCell.Offset(0, 7)) Then
ActiveCell = "False"
End If
Also note that an empty cell with trigger this.
Art
"Ctech" wrote:
>
> Hi
>
> If ActiveCell.Offset(0, 7).Value = ISNUMBER Then
> ActiveCell = "False"
> End If
>
>
> What is wrong here?
>
>
> --
> Ctech
> ------------------------------------------------------------------------
> Ctech's Profile: http://www.excelforum.com/member.php...o&userid=27745
> View this thread: http://www.excelforum.com/showthread...hreadid=500831
>
>
Hi Ctech
Typo
If IsNumeric(ActiveCell.Offset(0, 7).Value) Then
ActiveCell = "False"
End If
Regards Yngve
Also a good reason to put: Option Explicit at the beginning of your code.
Your code thought that ISNUMBER is a variable name.
Art
"Ctech" wrote:
>
> Hi
>
> If ActiveCell.Offset(0, 7).Value = ISNUMBER Then
> ActiveCell = "False"
> End If
>
>
> What is wrong here?
>
>
> --
> Ctech
> ------------------------------------------------------------------------
> Ctech's Profile: http://www.excelforum.com/member.php...o&userid=27745
> View this thread: http://www.excelforum.com/showthread...hreadid=500831
>
>
If Application.WorksheetFunction.IsNumber(ActiveCell.Offset(0, 7).Value) Then
ActiveCell.Value = "False"
End If
HTH,
--
Gary Brown
gary_brown@ge_NOSPAM.com
If this post was helpful, please click the ''Yes'' button next to ''Was this
Post Helpfull to you?''.
"Ctech" wrote:
>
> Hi
>
> If ActiveCell.Offset(0, 7).Value = ISNUMBER Then
> ActiveCell = "False"
> End If
>
>
> What is wrong here?
>
>
> --
> Ctech
> ------------------------------------------------------------------------
> Ctech's Profile: http://www.excelforum.com/member.php...o&userid=27745
> View this thread: http://www.excelforum.com/showthread...hreadid=500831
>
>
To build on what Art said,
If IsNumeric(ActiveCell.Offset(0, 7)) and ActiveCell.Offset(0,7) <> "" Then
ActiveCell = "False"
End If
This (or something similar) will check to make sure that the cell is not
blank as well.
I think this is what you want:
If IsNumeric(ActiveCell.Offset(0, 7).Value ) then
ActiveCell = "False"
end if
Your code would compare with a variable IsNumber which wouldn't (doesn't)
exist.
"Ctech" wrote:
>
> Hi
>
> If ActiveCell.Offset(0, 7).Value = ISNUMBER Then
> ActiveCell = "False"
> End If
>
>
> What is wrong here?
>
>
> --
> Ctech
> ------------------------------------------------------------------------
> Ctech's Profile: http://www.excelforum.com/member.php...o&userid=27745
> View this thread: http://www.excelforum.com/showthread...hreadid=500831
>
>
One of the differences between application.isnumber (or
application.worksheetfunction.isnumber) and VBA's isnumeric is how digits
masquerading as text is treated.
If the cell is formatted as text and contains 123 ('123), then VBA's isnumeric()
will be true. Application.isnumber() will return false. The worksheet function
is much less forgiving--it really has to be a number.
Ctech wrote:
>
> Hi
>
> If ActiveCell.Offset(0, 7).Value = ISNUMBER Then
> ActiveCell = "False"
> End If
>
> What is wrong here?
>
> --
> Ctech
> ------------------------------------------------------------------------
> Ctech's Profile: http://www.excelforum.com/member.php...o&userid=27745
> View this thread: http://www.excelforum.com/showthread...hreadid=500831
--
Dave Peterson
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks