LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default IsNumber (in Rick Rothstein's example)

I'm trying to write a function that checks whether an input is a positive
number.

Below is one of Rick Rothstein's examples that he recommands for use in
replacement of IsNumeric. But I need to expand it further so only "positive
whole number or integer" (i.e with or without decimal point) returns true.
While anything else with text, sign or symbol need to return false.

Any help is appreciated.

Function IsNumber(ByVal Value As String) As Boolean
IsNumber = Len(Value) 0 And Not Value Like "*[!0-9.]*"
End Function
 
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
Rick Rothstein Gordy99 Excel Programming 0 February 28th 08 07:05 PM
ISNUMBER Tanya Excel Worksheet Functions 5 December 6th 07 04:45 PM
Question for Rick Rothstein Jenny B. Excel Discussion (Misc queries) 0 June 27th 07 07:06 PM
answer to Rick Axel Excel Programming 7 June 25th 07 09:00 PM
ISNumber VBA trickdos[_9_] Excel Programming 7 July 23rd 04 10:37 PM


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

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

About Us

"It's about Microsoft Excel"