Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sumif text is contained winthin a longer text string in a cell | Excel Worksheet Functions | |||
Text does not display in "Text boxs" and when wrapping text in a c | Excel Discussion (Misc queries) | |||
Text not continuing to wrap for large block of text in Excel cell | Charts and Charting in Excel | |||
text (3750 char.)truncates with text wrap and row heigh adjusted? | Excel Discussion (Misc queries) | |||
want to remove all text characters equal to one character in length from text string | Excel Worksheet Functions |