View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Ensure cell contains a number

Sub ifnumber()
For Each c In Range("j1:j8")
If Len(Application.Trim(c)) 0 And _
IsNumeric(c) Then MsgBox c.Row
Next c
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"xp" wrote in message
...
I need a function I can call in code that will return true if the current
cell contents contains either a number or a formula that evaluates to a
number.

Can someone throw me a bone?

Thanks in advance!