+ Reply to Thread
Results 1 to 6 of 6

Want only digits in cell

  1. #1
    Registered User
    Join Date
    06-11-2024
    Location
    Lucknow, India
    MS-Off Ver
    Office 2007
    Posts
    2

    Want only digits in cell

    Account Details Format.xlsx

    I require that user to input only digits in column "Account No" (which has to be formatted as text only as some account numbers do start with zero also), no spaces or any alphabets or special characters. Please help

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,447

    Re: Want only digits in cell

    Hi,

    You could use a custom data validation...

    =VALUE(A1)>0
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,660

    Re: Want only digits in cell

    You can make Data Validation to accept only whole numbers between some range.
    However, this won't stop users to copy-paste text into this field.

    For such restriction you'll need VBA.

  4. #4
    Registered User
    Join Date
    06-11-2024
    Location
    Lucknow, India
    MS-Off Ver
    Office 2007
    Posts
    2

    Re: Want only digits in cell

    Quote Originally Posted by sweep View Post
    Hi,

    You could use a custom data validation...

    =VALUE(A1)>0
    Thanks, all good but cell is still accepting " ' ", like '033.

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,848

    Re: Want only digits in cell

    You require data as text - to ensure leading zeros are not lost - so 033 will appear as '033 in the formula bar.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  6. #6
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,132

    Re: Want only digits in cell

    Maybe, custom data validation in A1

    =ISNUMBER(A1)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 11-09-2017, 02:05 PM
  2. Match last 4 digits from cell with 4 digits in table
    By kc1ok in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-15-2017, 11:46 AM
  3. [SOLVED] add 0 to numerical digits of 6 digits only in mixed alphanumerical columns
    By JEAN1972 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-11-2017, 01:35 PM
  4. Changing digits after decimal to specific digits based on a criteria
    By mpatel000 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-28-2012, 02:41 AM
  5. Replies: 2
    Last Post: 10-04-2012, 01:59 PM
  6. how to remove first x digits and last y digits from a cell?
    By maixent in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 09-28-2009, 02:06 AM
  7. Replies: 5
    Last Post: 12-08-2008, 11:47 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1