ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   String or integer? (https://www.excelbanter.com/excel-programming/372149-string-integer.html)

JustinP

String or integer?
 
How can you test if a value is a string or integer?


Gary Keramidas

String or integer?
 
ISNUMBER(value)

ISTEXT(value)

worksheetfunction.isnumber(Range("a2"))
or
worksheetfunction.isnumber(Range("a2"))

depending on if you want true or false
--


Gary


"JustinP" wrote in message
ups.com...
How can you test if a value is a string or integer?




JMB

String or integer?
 
IsNumeric(x)

If you need something more exact, perhaps use VarType (see help for more
details).



"JustinP" wrote:

How can you test if a value is a string or integer?




All times are GMT +1. The time now is 09:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com