Checking the length of cell contents

G

Guest

I'm trying to set up a spreadsheet where the contents of cell A1 has a max
length of 128 characters. I want to give the number of characters left in
cell B1 which updates each time a character is entered in A1 without the user
having to press Enter.
Is this posible, and if so, does anyone know how?
 
G

Guest

That's what I'm using at the minute, but that only changes when you press
Enter.
Is there any way of changing B1 without pressing Enter?
 
D

Dave Peterson

Nope.

You could make a small userform that counts the characters--each time they
change the textbox in the userform.

===
Just curious--are you using data|validation to stop the entry at 128 characters?
 
G

Guest

but that only changes when you press

Not so...........it will change if you increase the number of characters in
A1 with VBA and it will change with a CopyAndPaste also............so,
exactly how are you changing the number of characters?

Vaya con Dios,
Chuck, CABGx3
 
D

Dave Peterson

I read the OP's question as though the user was typing in the formula bar. And
B1 should contain the current count of characters while the user is typing.

But I've read lots of messages incorrectly <bg>.
 
G

Guest

That's interesting.........and of course I agree with your response be that
the case.......but I read it as literally the characters being IN
A1.........hence my question.
cell B1 which updates each time a character is "ENTERED IN A1" without the user
having to press Enter.

Vaya con Dios,
Chuck, CABGx3
 
G

Guest

Dave - Yopu're right - the text would be typed into cell A1 and appear in the
formula bar as normal. There is also the option of direct cell editing as
usual.
 
D

Dave Peterson

And now you know that there's nothing built into excel that works that way.

So unless you do something special (like a userform), then it can't be done.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top