![]() |
How to set a column to accept only a specified number of digits
Hi, Can u tell me how to set a column in excel to accept only a specif number of digits? for example ... i want column A to accept onl numbers in the range 1-100. If 101 is type an error must be displayed Thank -- ashvi ----------------------------------------------------------------------- ashvik's Profile: http://www.excelforum.com/member.php...fo&userid=2754 View this thread: http://www.excelforum.com/showthread.php?threadid=47070 |
How to set a column to accept only a specified number of digits
You can use DataValidation to set the list of acceptable values for a range
- record a macro doing this through the user interface and then examine the vba code. Below is an example - allowing values between 1 and 100 only. Sub Macro1() With Selection.Validation .Delete .Add Type:=xlValidateDecimal, AlertStyle:=xlValidAlertStop, Operator _ :=xlBetween, Formula1:="1", Formula2:="100" .IgnoreBlank = True .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = True .ShowError = True End With End Sub -- www.alignment-systems.com "ashvik" wrote: Hi, Can u tell me how to set a column in excel to accept only a specify number of digits? for example ... i want column A to accept only numbers in the range 1-100. If 101 is type an error must be displayed Thanks -- ashvik ------------------------------------------------------------------------ ashvik's Profile: http://www.excelforum.com/member.php...o&userid=27543 View this thread: http://www.excelforum.com/showthread...hreadid=470708 |
How to set a column to accept only a specified number of digits
Hi Ashvik,
Menus | Data | Validation: Allow == 'Whole Number' Data == 'Between' Minimum == 1 Maximum == 100 --- Regards, Norman "ashvik" wrote in message ... Hi, Can u tell me how to set a column in excel to accept only a specify number of digits? for example ... i want column A to accept only numbers in the range 1-100. If 101 is type an error must be displayed Thanks -- ashvik ------------------------------------------------------------------------ ashvik's Profile: http://www.excelforum.com/member.php...o&userid=27543 View this thread: http://www.excelforum.com/showthread...hreadid=470708 |
How to set a column to accept only a specified number of digits
Check out data validation (implemented in XL through Data |
Validation...) -- Regards, Tushar Mehta www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article , says... Hi, Can u tell me how to set a column in excel to accept only a specify number of digits? for example ... i want column A to accept only numbers in the range 1-100. If 101 is type an error must be displayed Thanks -- ashvik ------------------------------------------------------------------------ ashvik's Profile: http://www.excelforum.com/member.php...o&userid=27543 View this thread: http://www.excelforum.com/showthread...hreadid=470708 |
All times are GMT +1. The time now is 11:42 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com