ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Testing for text (https://www.excelbanter.com/excel-programming/293152-testing-text.html)

art

Testing for text
 
How can I check the cell contents to identify whether the
value is text or not?

I thought I could get there with the IsNumeric function:
IsNumeric(ActiveCell) returns:

A blank cell is true.
A number is true.
Text is false.

So far so good, BUT ...

A date (like 3/15/2003) is FALSE! That doesn't work for me.

Art

Frank Kabel

Testing for text
 
Hi Art
you may try
If IsNumeric(Activecell.value) or IsDate(Activecell.value) then
msgbox "no text"
end if

--
Regards
Frank Kabel
Frankfurt, Germany

Art wrote:
How can I check the cell contents to identify whether the
value is text or not?

I thought I could get there with the IsNumeric function:
IsNumeric(ActiveCell) returns:

A blank cell is true.
A number is true.
Text is false.

So far so good, BUT ...

A date (like 3/15/2003) is FALSE! That doesn't work for me.

Art


art

Thanks Frank. (eom)
 

-----Original Message-----
Hi Art
you may try
If IsNumeric(Activecell.value) or IsDate

(Activecell.value) then
msgbox "no text"
end if

--
Regards
Frank Kabel
Frankfurt, Germany

Art wrote:
How can I check the cell contents to identify whether

the
value is text or not?

I thought I could get there with the IsNumeric function:
IsNumeric(ActiveCell) returns:

A blank cell is true.
A number is true.
Text is false.

So far so good, BUT ...

A date (like 3/15/2003) is FALSE! That doesn't work for

me.

Art

.



All times are GMT +1. The time now is 12:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com