+ Reply to Thread
Results 1 to 5 of 5

How to set limit in number of character in cells?

  1. #1
    Forum Contributor
    Join Date
    07-24-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2010 (office) 2013 (home)
    Posts
    256

    How to set limit in number of character in cells?

    Hi,

    In our accounting system, only 25 characters are allowed to key in. and normally we prepare in excel before key into the accounting system. However, we tends to forget about the system limitation and key in more than 25 characters to the cells.

    In order to combat this problem, i would like to know is there a way to set limit on the cells for maximum 25 characters only (including space).

    Thanks

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: How to set limit in number of character in cells?

    You can perhaps consider using Data Validation: http://www.contextures.com/xlDataVal06.html#Text
    (not 100% watertight but may suffice...)

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: How to set limit in number of character in cells?

    Hi,

    One way would be to use the Sheet Change event. e.g.

    Please Login or Register  to view this content.
    Obviously change the A:A column to reflect your circumstances.

    Rgds
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    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,444

    Re: How to set limit in number of character in cells?

    Hi,

    Highlight the cells you require limiting,

    Data > Validation > Custom > =(LEN(cell)<=25)

    where cell is the top left cell in the highlighted range
    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".

  5. #5
    Valued Forum Contributor scaffdog845's Avatar
    Join Date
    02-01-2008
    Location
    Aston, PA. USA.
    MS-Off Ver
    Microsoft 365
    Posts
    373

    Re: How to set limit in number of character in cells?

    Data ribbon - choose Data Validation in the Data Tools section. On the settings tab under Allow, choose text length then set Data to less than and Maximum to 26. The cell will then be limited to 25 characters
    Click here to read the Forum Rules
    Whatever it is in life you decide to go after, go after with great ferocity.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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