=FIND(Number,A1)

  • Thread starter Thread starter Adam
  • Start date Start date
A

Adam

Hi All,

Is there a way where I can use the FIND function or
another to determine whether a cell contains a numeric
value?

Thanks,

Adam
 
Try the following array formula (assumes A1 contains the data of interest):

=OR(ISNUMBER((FIND(ROW(1:10)-1,A1))))

entered with <Ctrl> <Shift> <Enter> rather than just <Enter>.
 
Try the following array formula (assumes A1 contains the data of interest):

=OR(ISNUMBER((FIND(ROW(1:10)-1,A1))))

entered with <Ctrl> <Shift> <Enter> rather than just <Enter>.

FWIW, could be done with fewer function calls and without having to be an array
formuls.

=OR(SUBSTITUTE(A1,{"0","1","2","3","4","5","6","7","8","9"},"")<>A1)
 
As always, your solution is more efficient, Harlan! (Although I thought mine
was more elegant -- quite subjective, of course <g>.)
 
As always, your solution is more efficient, Harlan! (Although I thought mine
was more elegant -- quite subjective, of course <g>.)
...

I'm not sure mine is more efficient. It avoids array entry, which is a
subjective benefit (but often a good idea in ng responses). However, purely
objectively, it uses fewer function calls in absolute number as well as nested
levels. That can often be vital in long, complex formulas. But long, complex
formulas are often less efficient than a few short, simple formulas in multiple
cells.
 
Back
Top