Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA write macro change column with 3 number digits to 4 digits the | Excel Discussion (Misc queries) | |||
number 12 digits to 15 digits | Excel Discussion (Misc queries) | |||
How to customize number to 10 digits including 2 digits after deci | Excel Worksheet Functions | |||
format a cell to accept a date or a whole number | Excel Discussion (Misc queries) | |||
How to set a column to accept only a specified number of digits | Excel Worksheet Functions |