close

Hi!
I would like for a cell to automatically fill a string to 7 characters
no mater how many characters they enter. example: If the user enters
A256 I want the cell to display A000256 or if the user enters A0256 it
will display A000256. Is there a way for formating to do this? If not
then what would the code look like to make it happen?
Thanks for any help!!--
Brian Matlack
------------------------------------------------------------------------
Brian Matlack's Profile: www.excelforum.com/member.php...foamp;userid=3508
View this thread: www.excelforum.com/showthread...hreadid=520330Hi!

Do all the entries start with the letter quot;Aquot;?

Maybe something like this:

Custom format: quot;Aquot;000000

Then the users would enter just the number, 256 (or whatever). However,
using this format the true underlying value of the cell would be numeric 256
and not the displayed value of A000256.

Another way:

Use a helper cell:

A1 = A256

B1 = formula:

=LEFT(A1)amp;TEXT(MID(A1,2,255),quot;000000quot;)

Biff

quot;Brian Matlackquot; gt;
wrote in message
news:Brian.Matlack.24dgfc_1141856405.7611@excelfor um-nospam.com...
gt;
gt; Hi!
gt; I would like for a cell to automatically fill a string to 7 characters
gt; no mater how many characters they enter. example: If the user enters
gt; A256 I want the cell to display A000256 or if the user enters A0256 it
gt; will display A000256. Is there a way for formating to do this? If not
gt; then what would the code look like to make it happen?
gt; Thanks for any help!!
gt;
gt;
gt; --
gt; Brian Matlack
gt; ------------------------------------------------------------------------
gt; Brian Matlack's Profile:
gt; www.excelforum.com/member.php...foamp;userid=3508
gt; View this thread: www.excelforum.com/showthread...hreadid=520330
gt;

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()