ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Change the format as data is entered (https://www.excelbanter.com/excel-discussion-misc-queries/192174-change-format-data-entered.html)

Niju David

Change the format as data is entered
 
How can i enter data in excel in such a way that as I enter the format will
be changed.
For eg: when i enter 12345 the format should change to *****. This should
happen as I enter data and not after I enter data and hit enter

Gary''s Student

Change the format as data is entered
 
Two ways:

1. use a macro. See OnKey in Excel VBA help

2. use a userform
--
Gary''s Student - gsnu200793


"Niju David" wrote:

How can i enter data in excel in such a way that as I enter the format will
be changed.
For eg: when i enter 12345 the format should change to *****. This should
happen as I enter data and not after I enter data and hit enter


Niju David

Change the format as data is entered
 
Could you please elaborate on this

"Gary''s Student" wrote:

Two ways:

1. use a macro. See OnKey in Excel VBA help

2. use a userform
--
Gary''s Student - gsnu200793


"Niju David" wrote:

How can i enter data in excel in such a way that as I enter the format will
be changed.
For eg: when i enter 12345 the format should change to *****. This should
happen as I enter data and not after I enter data and hit enter


Dave Peterson

Change the format as data is entered
 
Excel doesn't support anything like this when you're entering data into a cell.

But you could design a userform with a textbox and use the passwordchar property
to hide the value as it's being entered.

Niju David wrote:

How can i enter data in excel in such a way that as I enter the format will
be changed.
For eg: when i enter 12345 the format should change to *****. This should
happen as I enter data and not after I enter data and hit enter


--

Dave Peterson

Rick Rothstein \(MVP - VB\)[_729_]

Change the format as data is entered
 
Excel doesn't support anything like this when you're entering data into a
cell.


Just to add to Dave's statement...

Even if you could set up a format to mask the display in the cell, the true
value would always be displayed in the formula bar... that is just the way
Excel works. Accepting passwords (what I think you [the OP] are asking for)
is not something a worksheet was designed to do. The suggestion to use a
UserForm is the way to go.

Rick



All times are GMT +1. The time now is 01:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com