Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 354
Default Ignore Text, function only for numerical values

Hi I'm using a loop function to evaluate the value in a cell and perform a
desired function, then moves on to the next row until it reaches the last row
in my sheet.

My evalution criteria is (but I need help fixing it):
if activecell <0 Or activecell="" then
Something
else
SomethingElse
End if

Here my question:
How can I change my if statement to only do Something if the value in the
cell is a number (ignore textual entries) and is different than 0 or is empty

Thanks for the help

Daniel
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Ignore Text, function only for numerical values

My evalution criteria is (but I need help fixing it):
if activecell <0 Or activecell="" then
Something
else
if isnumeric(activeCell) then
if activeCell.Text < "0" then
SomethingElse
end if
end if
End if

--
Regards,
Tom Ogilvy


"Daniel" wrote in message
...
Hi I'm using a loop function to evaluate the value in a cell and perform a
desired function, then moves on to the next row until it reaches the last

row
in my sheet.

My evalution criteria is (but I need help fixing it):
if activecell <0 Or activecell="" then
Something
else
SomethingElse
End if

Here my question:
How can I change my if statement to only do Something if the value in the
cell is a number (ignore textual entries) and is different than 0 or is

empty

Thanks for the help

Daniel



  #3   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default Ignore Text, function only for numerical values

Check out IsNumeric.

Ed

"Daniel" wrote in message
...
Hi I'm using a loop function to evaluate the value in a cell and perform a
desired function, then moves on to the next row until it reaches the last

row
in my sheet.

My evalution criteria is (but I need help fixing it):
if activecell <0 Or activecell="" then
Something
else
SomethingElse
End if

Here my question:
How can I change my if statement to only do Something if the value in the
cell is a number (ignore textual entries) and is different than 0 or is

empty

Thanks for the help

Daniel



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
Converting text to numerical values J New Users to Excel 1 February 16th 10 04:14 PM
text and numerical values in two columns Bev[_2_] Excel Discussion (Misc queries) 3 May 26th 08 03:12 PM
text has numerical values TXEagle Excel Worksheet Functions 5 August 16th 05 11:34 PM
Assign numerical values to text codes Bridget Excel Worksheet Functions 3 April 18th 05 11:33 PM
Copying Text vs. Numerical Values T. Jenkins[_2_] Excel Programming 1 August 21st 03 04:03 AM


All times are GMT +1. The time now is 11:12 PM.

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

About Us

"It's about Microsoft Excel"