View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default Detecting a number versus text?

One way:

If IsNumeric(Cells(1, 1).Value) Then
....


In article .com,
"Chet" wrote:

Does anyone know how to tell if a cell is a number when the value in
that cell is actually text? In other words if I have the character 3
in a cell and the cell is in the format of "text" how can I tell that
this is in fact a number in my code. I tried using the cint function
but I got an error message upon performing this function.

Thanks,
Chet