View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
John Wilson John Wilson is offline
external usenet poster
 
Posts: 550
Default Numerical Data vs Text

Jim,

Sub TestMe()
MsgBox isnumeric(Range("B8"))
End Sub

Will return True if it's numeric and False if not

John

"Jim Hollis" wrote in message
...
How can I figure out if a cell contains numerical data or a string (text)?

I need to compare some cells, and need my subroutine to be intelligent
enough not to try to compare a number to a bunch of text. Thanks.

Jim