check data type in excel

  • Thread starter Thread starter Grey
  • Start date Start date
G

Grey

I have a column with number and string. if it is number, i need to do
something, while string, i need to do other.
is it possible to check the data type of one cell??

million thanks
 
One way would be to use IsText(), and/or IsNumber().
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================



I have a column with number and string. if it is number, i need to do
something, while string, i need to do other.
is it possible to check the data type of one cell??

million thanks
 
Grey said:
I have a column with number and string. if it is number, i need to do
something, while string, i need to do other.
is it possible to check the data type of one cell??

million thanks

Try

=IF(CELL("type",A1)="v","Do something if number","Do something if
string")

CELL("type",A1) returns text value corresponding to the type of data
in the cell. Returns "b" for blank if the cell is empty, "l" for label
if the cell contains a text constant, and "v" for value if the cell
contains anything else.

Regards
 
Back
Top