*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

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Juan Pablo González

MrExcel MVP
Joined
Feb 8, 2002
Messages
11,959
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

texasalynn

Well-known Member
Joined
May 19, 2002
Messages
8,458
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

jkeyes

Active Member
Joined
Apr 15, 2003
Messages
343
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

jkeyes

Active Member
Joined
Apr 15, 2003
Messages
343
ADVERTISEMENT
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

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,367
Office Version
  1. 365
Platform
  1. Windows
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,195,632
Messages
6,010,812
Members
441,569
Latest member
PeggyLee

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
Top