Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default numeric data with restriction of data length

how can i set a cell or column value to accept only numeric data with the
restrition of 16 digit length ???


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default numeric data with restriction of data length

Use Data validation

Custom

Formula:

=Len(A1)=16

which will allow ONLY length of 16



"kHuRRum HumaYun" wrote:

how can i set a cell or column value to accept only numeric data with the
restrition of 16 digit length ???


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default numeric data with restriction of data length

how can i set a cell or column value to accept only numeric
data with the restrition of 16 digit length ???


It is unclear from your post whether you want exactly 16 digits to be
entered or a maximum of 16 digits to be entered. The formula below assumes
the maximum of 16 digits (change the <= to = for exactly 16 digits).

Select the cell, cells or entire column (as appropriate), click
Data/DataValidation on Excel's menu bar, change the Allow drop-down to
Custom and use this formula in Formula field...

=AND(LEN(A1)<=16,ISNUMBER(A1))

Change the A1 reference to the address of the first cell in the range you
have selected.

Rick

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default numeric data with restriction of data length

The suggestions given both work but be aware that Excel will accept 15 digit
numbers only.

The 16th will be turned to zero.

1234567812345678 will become 1234567812345670

If you need the 16 digits the cell must be formatted as Text.


Gord Dibben MS Excel MVP

On Thu, 9 Aug 2007 07:50:27 -0700, kHuRRum HumaYun <kHuRRum
wrote:

how can i set a cell or column value to accept only numeric data with the
restrition of 16 digit length ???


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
character length in data forms phdbd Excel Discussion (Misc queries) 0 October 11th 06 06:15 PM
Data Validation - Restriction Kevin Excel Discussion (Misc queries) 7 March 2nd 06 10:10 AM
Adding "fixed" data to variable length data [email protected] Excel Worksheet Functions 3 February 16th 06 08:59 PM
Data Validation List Length Alex Mackenzie Excel Worksheet Functions 4 November 1st 05 01:27 AM
length of character data Saravanan Excel Discussion (Misc queries) 2 December 19th 04 06:49 PM


All times are GMT +1. The time now is 11:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"