Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
tim tim is offline
external usenet poster
 
Posts: 105
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
tim tim is offline
external usenet poster
 
Posts: 105
Default Number Validation


How would i do that.
  #4   Report Post  
Posted to microsoft.public.excel.programming
tim tim is offline
external usenet poster
 
Posts: 105
Default Number Validation

And some of the text values are inserted by other forms.
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 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.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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.



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
Validation of UK VAT Number Rob Excel Worksheet Functions 24 October 18th 13 05:25 PM
custom validation with number & text aditya New Users to Excel 3 May 25th 09 10:36 PM
custom validation number and text aditya Excel Discussion (Misc queries) 1 May 25th 09 02:37 PM
validation for phone number Candice Excel Discussion (Misc queries) 3 April 28th 06 08:51 PM
attach a label to number, like validation but follows the number Rickster Excel Worksheet Functions 0 February 2nd 06 08:58 PM


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

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"