#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Text detector

I'm stuck on creating a formula. Here's what i'm trying to do.

In a certain field an entry should be of numerical value only, no text, not
dots no dashes. What i'm looking to do is return a value of 0 for anything
that has anything other than a number in it.

Is this possible?

Thanks

Andy
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Text detector

Andy,

There are two problems - dashes are often used in date entry, so it looks
like a string with dashes, but it is really a number that Excel formats to
look like a date with dashes. The other is the 'dots' are decimal points in
some systems, and they are allowed in numbers.

I'm going to assume you want integer values only, so try and use Data /
Validation.... Whole number only, and set a max and min value. You can also
set the error message and the entry prompt message to help your users.

If you really need a formula, something along the lines of

=IF(ISERROR(INT(A1)),0,IF(A1<INT(A1),0,A1))

HTH,
Bernie
MS Excel MVP

"O2 andy" wrote in message
...
I'm stuck on creating a formula. Here's what i'm trying to do.

In a certain field an entry should be of numerical value only, no text,
not
dots no dashes. What i'm looking to do is return a value of 0 for
anything
that has anything other than a number in it.

Is this possible?

Thanks

Andy



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Text detector

Maybe something like this: =IF(ISTEXT(A1),0, ...
--
Max
Singapore
http://savefile.com/projects/236895
Files: 352, Subscribers: 53, Downloads: 15,500
xdemechanik
---
"O2 andy" wrote:
I'm stuck on creating a formula. Here's what i'm trying to do.

In a certain field an entry should be of numerical value only, no text, not
dots no dashes. What i'm looking to do is return a value of 0 for anything
that has anything other than a number in it.

Is this possible?

Thanks

Andy

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Text detector

Hi Bernie,

Formula works a treat, thanks!!!

Andy

"Bernie Deitrick" wrote:

Andy,

There are two problems - dashes are often used in date entry, so it looks
like a string with dashes, but it is really a number that Excel formats to
look like a date with dashes. The other is the 'dots' are decimal points in
some systems, and they are allowed in numbers.

I'm going to assume you want integer values only, so try and use Data /
Validation.... Whole number only, and set a max and min value. You can also
set the error message and the entry prompt message to help your users.

If you really need a formula, something along the lines of

=IF(ISERROR(INT(A1)),0,IF(A1<INT(A1),0,A1))

HTH,
Bernie
MS Excel MVP

"O2 andy" wrote in message
...
I'm stuck on creating a formula. Here's what i'm trying to do.

In a certain field an entry should be of numerical value only, no text,
not
dots no dashes. What i'm looking to do is return a value of 0 for
anything
that has anything other than a number in it.

Is this possible?

Thanks

Andy




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sumif text is contained winthin a longer text string in a cell Johnny M[_2_] Excel Worksheet Functions 3 March 21st 07 02:50 PM
Text does not display in "Text boxs" and when wrapping text in a c Esteban Excel Discussion (Misc queries) 1 March 8th 07 11:59 PM
Text not continuing to wrap for large block of text in Excel cell Mandra Charts and Charting in Excel 1 May 15th 06 07:13 PM
text (3750 char.)truncates with text wrap and row heigh adjusted? Boydster Excel Discussion (Misc queries) 1 May 19th 05 05:59 PM
want to remove all text characters equal to one character in length from text string [email protected] Excel Worksheet Functions 1 April 18th 05 12:25 AM


All times are GMT +1. The time now is 10:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"