Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 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/

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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/



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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/



.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default If integer is text???

Still no luck:

Runtime error with IsNumber

'Sub or function not defined

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

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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/

.



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default If integer is text???

IsNumeric!!! (not isnumber...)

Thanks all! :o

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

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 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/

.


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
How do I add an integer to an existing integer? Aaron Excel Worksheet Functions 3 December 17th 09 09:46 PM
Help creating a formula that repeats text & increments an integer djow Excel Discussion (Misc queries) 3 July 30th 09 01:04 AM
Convert Text to Integer jerredjohnson Excel Discussion (Misc queries) 4 June 14th 06 07:45 PM
Extracting an integer from text craig-o Excel Discussion (Misc queries) 1 November 9th 05 08:57 PM
Get next Integer value Stuart[_5_] Excel Programming 7 February 16th 04 04:48 AM


All times are GMT +1. The time now is 04:02 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"