=FIND(Number,A1)

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
 
V

Vasant Nanavati

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>.
 
H

Harlan Grove

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)
 
V

Vasant Nanavati

As always, your solution is more efficient, Harlan! (Although I thought mine
was more elegant -- quite subjective, of course <g>.)
 
H

Harlan Grove

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top