Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
opposite of IsNumeric
Hi, I know that IsNumeric returns true if the selection is only numbers but is there a function that returns true if the selection is all text Using If Not IsNumeric does not work, because if something contain text and numbers it returns true, which is what I do not want. Thanks, Stev -- thephoenix1 ----------------------------------------------------------------------- thephoenix12's Profile: http://www.excelforum.com/member.php...fo&userid=2433 View this thread: http://www.excelforum.com/showthread.php?threadid=38173 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
opposite of IsNumeric
Look at VBA HELP on the LIKE operator.
-- Regards, Tom Ogilvy wrote in message news:thephoenix12.1r3i6x_1119557176.2224@excelforu m-nospam.com... Hi, I know that IsNumeric returns true if the selection is only numbers, but is there a function that returns true if the selection is all text? Using If Not IsNumeric does not work, because if something contains text and numbers it returns true, which is what I do not want. Thanks, Steve -- thephoenix12 ------------------------------------------------------------------------ thephoenix12's Profile: http://www.excelforum.com/member.php...o&userid=24336 View this thread: http://www.excelforum.com/showthread...hreadid=381732 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
opposite of IsNumeric
It is not pretty, but if you had only numbers and/or letters and you wanted
to check for at least one number in the string: Option Explicit Sub AllText() Dim i As Integer Dim TestString As String TestString = Range("A1") For i = 1 To Len(TestString) If IsNumeric(Mid(TestString, i, 1)) Then MsgBox ("Not text") Exit For End If Next i End Sub -- Ken Hudson "thephoenix12" wrote: Hi, I know that IsNumeric returns true if the selection is only numbers, but is there a function that returns true if the selection is all text? Using If Not IsNumeric does not work, because if something contains text and numbers it returns true, which is what I do not want. Thanks, Steve -- thephoenix12 ------------------------------------------------------------------------ thephoenix12's Profile: http://www.excelforum.com/member.php...o&userid=24336 View this thread: http://www.excelforum.com/showthread...hreadid=381732 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
IsNumeric with array or range | New Users to Excel | |||
opposite of IsNumeric | Excel Discussion (Misc queries) | |||
IsNumeric Test | Excel Programming | |||
Not IsNumeric not working - or is it me? | Excel Programming | |||
check Isnumeric, doesnot work well | Excel Programming |