ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   If integer is text??? (https://www.excelbanter.com/excel-programming/296429-if-integer-text.html)

Steff_DK[_11_]

If integer is text???
 
If activecell is text I get a runtime error with the code below (o
course...).

I'd like to goto Nosearch, if cell value is text.
How can I write this into the below code?

Dim iSpecific As Integer
iSpecific = ActiveCell.Value

If ActiveCell.Value = "" Then
GoTo Nosearch
End I

--
Message posted from http://www.ExcelForum.com


Tom Ogilvy

If integer is text???
 
Dim iSpecific As Integer
if not( isnumber(activeCell)) or Activecell.Text = "" then
goto NoSearch
End if

iSpecific = ActiveCell.Value


--
Regards,
Tom Ogilvy

"Steff_DK " wrote in message
...
If activecell is text I get a runtime error with the code below (of
course...).

I'd like to goto Nosearch, if cell value is text.
How can I write this into the below code?

Dim iSpecific As Integer
iSpecific = ActiveCell.Value

If ActiveCell.Value = "" Then
GoTo Nosearch
End If


---
Message posted from http://www.ExcelForum.com/




Frank Kabel

If integer is text???
 
Hi
try

Dim iSpecific As Integer
If Isnumeric(activecell.value) then
iSpecific = ActiveCell.Value
elseif ActiveCell.Value < "" Then
GoTo Nosearch
End If

-----Original Message-----
If activecell is text I get a runtime error with the code

below (of
course...).

I'd like to goto Nosearch, if cell value is text.
How can I write this into the below code?

Dim iSpecific As Integer
iSpecific = ActiveCell.Value

If ActiveCell.Value = "" Then
GoTo Nosearch
End If


---
Message posted from http://www.ExcelForum.com/

.


Bob Phillips[_6_]

If integer is text???
 
Hi Steff,

If Not IsNumeric(ActiveCell.Value) Then
GoTo NoSearch
End If

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Steff_DK " wrote in message
...
If activecell is text I get a runtime error with the code below (of
course...).

I'd like to goto Nosearch, if cell value is text.
How can I write this into the below code?

Dim iSpecific As Integer
iSpecific = ActiveCell.Value

If ActiveCell.Value = "" Then
GoTo Nosearch
End If


---
Message posted from http://www.ExcelForum.com/




Frank abel

If integer is text???
 
Hi Tom
you probably meant IsNumeric instead of IsNumber :-)
Besides that I'm still not sure what the OP really wants
to check :-)

-----Original Message-----
Dim iSpecific As Integer
if not( isnumber(activeCell)) or Activecell.Text = "" then
goto NoSearch
End if

iSpecific = ActiveCell.Value


--
Regards,
Tom Ogilvy

"Steff_DK "

wrote in message
...
If activecell is text I get a runtime error with the

code below (of
course...).

I'd like to goto Nosearch, if cell value is text.
How can I write this into the below code?

Dim iSpecific As Integer
iSpecific = ActiveCell.Value

If ActiveCell.Value = "" Then
GoTo Nosearch
End If


---
Message posted from http://www.ExcelForum.com/



.


Steff_DK[_12_]

If integer is text???
 
Still no luck:

Runtime error with IsNumber

'Sub or function not defined

--
Message posted from http://www.ExcelForum.com


Tom Ogilvy

If integer is text???
 
ActiveCell.ClearContents
? isnumeric(activecell)
True


--
Regards,
Tom Ogilvy

"Frank Kabel" wrote in message
...
Hi
try

Dim iSpecific As Integer
If Isnumeric(activecell.value) then
iSpecific = ActiveCell.Value
elseif ActiveCell.Value < "" Then
GoTo Nosearch
End If

-----Original Message-----
If activecell is text I get a runtime error with the code

below (of
course...).

I'd like to goto Nosearch, if cell value is text.
How can I write this into the below code?

Dim iSpecific As Integer
iSpecific = ActiveCell.Value

If ActiveCell.Value = "" Then
GoTo Nosearch
End If


---
Message posted from http://www.ExcelForum.com/

.




Steff_DK[_13_]

If integer is text???
 
IsNumeric!!! (not isnumber...)

Thanks all! :o

--
Message posted from http://www.ExcelForum.com


Frank Kabel

If integer is text???
 
Hi Tom
good point :-)

--
Regards
Frank Kabel
Frankfurt, Germany


Tom Ogilvy wrote:
ActiveCell.ClearContents
? isnumeric(activecell)
True



"Frank Kabel" wrote in message
...
Hi
try

Dim iSpecific As Integer
If Isnumeric(activecell.value) then
iSpecific = ActiveCell.Value
elseif ActiveCell.Value < "" Then
GoTo Nosearch
End If

-----Original Message-----
If activecell is text I get a runtime error with the code below (of
course...).

I'd like to goto Nosearch, if cell value is text.
How can I write this into the below code?

Dim iSpecific As Integer
iSpecific = ActiveCell.Value

If ActiveCell.Value = "" Then
GoTo Nosearch
End If


---
Message posted from http://www.ExcelForum.com/

.




All times are GMT +1. The time now is 02:59 AM.

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