Entering a certain text automatically

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a simple? problem that I can't solve. If I enter "f", I want that
Excel enters word "free" automatically in that same cell and if I enter "s",
Excel enters "sick" and so on. This has to happen everywhere in the
spredsheet. (Enable AutoComplete for cell values isn't enough). The data
should be in a common cell. Can anyone help me?
 
Hello Teija
Do you want this behaviour for any Excel sheet or for just one specific
sheet?
if the latter:
right-click on the sheet tab, select View code and paste this:
Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Text
Case Is = "f"
Application.EnableEvents = False
Target.Value = "free"
Application.EnableEvents = True
Case Is = "s"
Application.EnableEvents = False
Target.Value = "sick"
Application.EnableEvents = True
End Select
End Sub

HTH
Cordially
Pascal
 
Hi Teija,

You have to program the software to remember your word but if you use my
spreasheet for example I have programmed it to remember Mobile or STD, this
is for my Excel Telephone Book Spreadsheet and what I did was set the
validation rule and typed in the values e.g. Mobile or STD and now whenever I
type the first letter of the word, it automatically pops up. It's really not
as hard as it seems, you should give this a try, it's simple!

Cheers
 
Hello Papou!

I copied your code but nothing happens when I enter "v" or "s". Why??? Do
you know the reason? It hasn't anything to do with the language, the code is
international, I suppose.

Any suggestions to repair?
 
Hi Atellati!

The only problem is that although I'm good in Excel I can't make any code.

Teija
 

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

Back
Top