*Running* count of characters in a cell

jkeyes

Active Member
Joined
Apr 15, 2003
Messages
343
I want to have a running count of characters in a cell. I would just use the Len formula, however, that only returns a value upon hitting enter or selecting another cell. I need a way to show, in real time, the count of characters being entered into a cell.

If the solution requires VBA/an entry userform, I'm prepared to do that (though not my first choice). I just need to know how to appraoch it... thanks in advance for any and all help!!!
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Macros can't run when you're in edit mode... which is what you are when you're entering data in a cell. So, unless you can enter the data through a different method, there's no way that I know of.
 
Upvote 0
why? Are you trying to limit the number of characters to be entered in a cell? If so you can use data validation.
 
Upvote 0
The cell in question is a spot for the user to enter a tagline or slogan. They are limited to the number of characters used, and I want them to see how many they have remaining as they enter them.
 
Upvote 0
Can I use the LEN function to determine the characters being entered into a textbox on a userform in real time, with the value returned to a label on the userform?
 
Upvote 0
Yes.

Add a tetxbox and a label.

Double click the textbox.

Code:
Private Sub TextBox1_Change()
    Label1 = Len(TextBox1)
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,596
Messages
6,120,438
Members
448,966
Latest member
DannyC96

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top