+ Reply to Thread
Results 1 to 4 of 4

Counting characters as they are entered into a cell

  1. #1
    Registered User
    Join Date
    03-09-2014
    Location
    Manchester, England
    MS-Off Ver
    Excel 2013
    Posts
    31

    Counting characters as they are entered into a cell

    Does anyone know of a way to count characters as they are entered into a cell? I want to display the 'characters left' from a limit of say 50, just like when writing a cell phone text message you get a count down from the 160 characters allowed (e.g. 80 entered out of 160 would be 80/160). I have tried data validation, but that only works after enter key pressed. Also worksheet_change event with len of cell value, same problem. I have searched extensively but cannot find a solution.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,926

    Re: Counting characters as they are entered into a cell

    Things that happen on the Excel Sheet happen at the cell level either when you navigate into the cell or away from it.

    However, you can probably use an excel form. Excel forms can capture data keystroke by keystroke. You would need a commit button to put the data back into the cell.

    Or if you are interested in limiting the input to 50 characters, without keeping a running count, you can put a change event on the cell and use Target.Value = LEFT(Target.Value,50).
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    03-09-2014
    Location
    Manchester, England
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Counting characters as they are entered into a cell

    Thanks for responding dflak. I really want to keep a running count.

    I guess I will have to use a userform. How would I capture the keystrokes in a TextBox?

  4. #4
    Registered User
    Join Date
    03-09-2014
    Location
    Manchester, England
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Counting characters as they are entered into a cell

    Ok, just answered my own question, with a bit of research, using the Textbox_Change event

+ 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. Counting +1 when data is entered another cell
    By chrisdantonelli in forum Excel General
    Replies: 8
    Last Post: 01-14-2016, 01:00 PM
  2. [SOLVED] displaying number of characters entered into a cell while typing
    By Alex Zbinden in forum Excel - New Users/Basics
    Replies: 10
    Last Post: 01-13-2015, 05:22 PM
  3. Replies: 4
    Last Post: 08-06-2012, 11:52 AM
  4. [SOLVED] Formula is counting cell if nothing is entered
    By Jennifer in forum Excel General
    Replies: 4
    Last Post: 12-14-2005, 09:20 PM
  5. change the characters entered in cell as a Password charactes
    By rajendran in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-07-2005, 10:00 AM
  6. Restricting the Number of Characters Entered into a Cell
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 08-23-2005, 03:27 AM
  7. [SOLVED] Counting Characters in a Cell
    By carl in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-04-2005, 12:06 PM

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