![]() |
If cell = number ?
Hi If ActiveCell.Offset(0, 7).Value = ISNUMBER Then ActiveCell = "False" End If What is wrong here -- Ctec ----------------------------------------------------------------------- Ctech's Profile: http://www.excelforum.com/member.php...fo&userid=2774 View this thread: http://www.excelforum.com/showthread.php?threadid=50083 |
If cell = number ?
Hi Ctech
Try this If ISNUMBER(ActiveCell.Offset(0, 7).Value) Then ActiveCell = "False" End If Regards Yngve |
If cell = number ?
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 |
If cell = number ?
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 cell = number ?
Hi Ctech Typo If IsNumeric(ActiveCell.Offset(0, 7).Value) Then ActiveCell = "False" End If Regards Yngve |
If cell = number ?
I get error "Sub of function not known" -- Ctec ----------------------------------------------------------------------- Ctech's Profile: http://www.excelforum.com/member.php...fo&userid=2774 View this thread: http://www.excelforum.com/showthread.php?threadid=50083 |
If cell = number ?
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. |
If cell = number ?
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 |
If cell = number ?
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 |
All times are GMT +1. The time now is 03:32 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com