Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,814
Default vba to check cell contents

In my vba routine I want to check the cell contents to see if it's NOT a
numerical value. And I'm considering a blank cell to be non-numeric.

Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default vba to check cell contents

if application.isnumber(mycell.value)) then
it's a number the way excel sees it!


if isnumeric(mycell.value) then
is far less stringent than the =isnumber() excel function.
If it looks like it could be a number, it's numeric.

Steve wrote:

In my vba routine I want to check the cell contents to see if it's NOT a
numerical value. And I'm considering a blank cell to be non-numeric.

Thanks.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default vba to check cell contents

hi
work something like this into your routine....
Sub whatisit()
Dim r As Range
Set r = Range("C10")
If WorksheetFunction.IsNumber(r) Then
MsgBox "is number"
Else
MsgBox "is not number"
End If
End Sub

regards
FSt1

"Steve" wrote:

In my vba routine I want to check the cell contents to see if it's NOT a
numerical value. And I'm considering a blank cell to be non-numeric.

Thanks.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Have code check cell contents on edit. Andrew Excel Worksheet Functions 1 January 16th 08 04:47 AM
check for repetition of cell contents David Excel Worksheet Functions 1 September 14th 06 09:31 AM
Check cell contents before print nobbyknownowt Setting up and Configuration of Excel 3 May 26th 06 11:48 PM
Fussy check of cell contents access_mk Excel Discussion (Misc queries) 1 April 19th 06 01:28 PM
IF statement to check cell contents Lance Gray Excel Worksheet Functions 1 May 29th 05 10:53 PM


All times are GMT +1. The time now is 03:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"