If you may have a containing a text value that looks like a number (like
'54--leading apostrophe), you can use the worksheet function:
if application.isnumber(range("a1").value) then
This'll also dump empty cells.
if isnumeric(range("a1").value) then
will show (empty) as numeric.
courtesio99 wrote:
How do I check whether a certain cell has a number in it in code?
For example, i know Count(A1) gives 1 if cell A1 contains a valid
number instead of text. How do I do that in code?
I did the following but could not work:
If Count(Cell(1,1))0 Then
..
End If
---
Message posted from http://www.ExcelForum.com/
--
Dave Peterson