G
Guest
I want to check a list of cells to be sure they're all numbers before
performing a computation on them. Is there a quick way (as opposed to
looping through all the cells) to check? I could set the cells up as either
an array or range but IsNumeric doesn't seem to work on either as simply
IsNumeric(MyRange). I also tried
For Each cell In MyRange
If IsNumeric(cell.Value) Then GoTo ContinueToNextCell
a = 4
Exit For
ContinueToNextCell:
Next cell
but this doesn't work because it passes logical as well as numeric values
(apparently IsNumeric treats logical values as numbers?).
Also, I can't get IsLogical or IsNumeric to work (shouldn't I be able to use
these with "xl" in front?)
thanks,
Jerry
performing a computation on them. Is there a quick way (as opposed to
looping through all the cells) to check? I could set the cells up as either
an array or range but IsNumeric doesn't seem to work on either as simply
IsNumeric(MyRange). I also tried
For Each cell In MyRange
If IsNumeric(cell.Value) Then GoTo ContinueToNextCell
a = 4
Exit For
ContinueToNextCell:
Next cell
but this doesn't work because it passes logical as well as numeric values
(apparently IsNumeric treats logical values as numbers?).
Also, I can't get IsLogical or IsNumeric to work (shouldn't I be able to use
these with "xl" in front?)
thanks,
Jerry