![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 05:37 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com