input mask

  • Thread starter Thread starter kari
  • Start date Start date
K

kari

is it possible to assign an input mask to a cell in excel
(i do this in forms in access).

Example: entering phone #

The cell before data entry would display an input mask
like this:

(___)___-____

and as the user types in the phone number, the #'s fill
in the blanks, skipping the parenthesis and dash.

maybe using visual basics?
 
Kari

Excel has this built-in.

Format>Cells>Number>Special. Choose "phone number".

Gord Dibben Excel MVP
 
Gord

Thanks for responding. I tried that, but it's not what
i'm after. Because i want all our employees to enter the
phone number in exactly the same way, with the full
number and area code and pre-set seperators. If i just
format the cell, they can leave off the area code and get
away with it. I tried a combination of formating and
validation, that required 10 digits to be entered, and
they find this frustrating, because they keep typing it
wrong, getting the error message and having to re-type
it. I thought if they had a visual picture in the cell
(___)___-____ that they could watch fill in that it would
be less confussing and frustrating for all.

Any further thoughts?

kari
 
kari

Sorry, I cannot help with that.

The data validation with "phone number" formatting sounds fine to me. If they
can't get it right, let them re-type. After a time they will learn.

Gord
 
Here's a suggestion. Put an masked edit control on the worksheet
(Controls Toolbox, more controls, pick masked edit from list and draw
on the worksheet) and make it *appear* as if it is a cell. This
control should be familiar if you've used one on a MS Access form e.g.
set the mask property to

(###)###-####

You could then use VBA to trap the relevant events to do your own
validation.
 
Back
Top