+ Reply to Thread
Results 1 to 2 of 2

Automatic limitation of the number of Characters in cells

  1. #1
    Registered User
    Join Date
    06-09-2017
    Location
    germany
    MS-Off Ver
    2010
    Posts
    23

    Automatic limitation of the number of Characters in cells

    Good day everyone,

    I have a worksheet that I currently working on that where I have to limit the characters in some cells to 40 characters I know I could use the data validation but the point is that I need it to delete the excess over the 40 characters and not like the data validation to delete everything once it doesn't meet the criteria

    the idea of the macro
    my vision is that I need it to be activated once the cell is pasted in send a message box that "the Characters have been reset to 40"

    I have tried multiple codes with almost none of them working the one that I got so close to went into an endless loop of copying and pasting. since I created a hidden column ( lets call it E) where I used a formula to limit the letters to 40 and the idea of the code was to check if there is a value in that cell in column E and then copy and special paste values into the other column ( lets call it B) making me un able to use the sheet anymore.

    now I ran out of ideas on how to solve this issue

    please tell me if there is anything that is not clear so I can rephrase it since even I find it complicated to describe something I don't fully understand

    your help is much appreciated.

    Kind regards,
    George.m

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Automatic limitation of the number of Characters in cells

    As you will probably find out in a few minutes... I am woeful with VBA. This code limits column A to 7 characters:

    Please Login or Register  to view this content.
    Does this look OK to you?
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

+ 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. [SOLVED] Count cells where characters 2 to 8 is a number
    By DD1 in forum Excel General
    Replies: 8
    Last Post: 08-16-2015, 09:17 PM
  2. Summation of Number, Empty Cells and Cells with characters
    By iyounis in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-02-2013, 08:29 PM
  3. Automatic Line Break at X number of characters
    By duyane in forum Excel General
    Replies: 3
    Last Post: 07-17-2012, 02:12 AM
  4. How to count characters in a number of cells?
    By Staalander in forum Excel General
    Replies: 8
    Last Post: 01-11-2007, 11:36 AM
  5. Replies: 5
    Last Post: 10-10-2005, 08:05 PM
  6. Find cells containing a specified number of characters
    By jdanker in forum Excel General
    Replies: 3
    Last Post: 08-23-2005, 04:05 PM
  7. [SOLVED] Limitation in number of charts
    By Jan Kronsell in forum Excel General
    Replies: 2
    Last Post: 05-02-2005, 09:06 AM

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