ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Number Validation (https://www.excelbanter.com/excel-programming/290483-number-validation.html)

tim

Number Validation
 
I have set columns to data-Validation, Formula-Custom, Formula=ISNUMBER(M:M) for say row M. The foemula does not allow me to enter text into the cells which is good but this column pull data from other sheets with a macro and it will take the text then. How can i have a column have and accept only numbers.

Frank Kabel

Number Validation
 
Tim wrote:
I have set columns to data-Validation, Formula-Custom,
Formula=ISNUMBER(M:M) for say row M. The foemula does not allow me to
enter text into the cells which is good but this column pull data
from other sheets with a macro and it will take the text then. How
can i have a column have and accept only numbers.


Hi Tim
one way: adapt the macro to test for text values for this cell.

Frank


tim

Number Validation
 

How would i do that.

tim

Number Validation
 
And some of the text values are inserted by other forms.

Frank Kabel

Number Validation
 
Hi Tim
as I don't know your code its difficult to say but somethere in the
code should be an insertion method. In this part of the code you have
to check if the entry is valid or not.
Another way would be to create a separate macro which will test your
column after the insertion and deletes invalid entries.

Frank

Tim wrote:
How would i do that.




Tom Ogilvy

Number Validation
 
if isnumeric(mydata) then
Range("M1").Value = mydata
else
' mydata contains non numeric information
' do nothing
End if

--
Regards,
Tom Ogilvy

"Tim" wrote in message
...

How would i do that.





All times are GMT +1. The time now is 07:24 PM.

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