Automatically Change Text in Cell

  • Thread starter Thread starter brettmanning24
  • Start date Start date
B

brettmanning24

Hi,

I am not sure but there maybe a really easy way to do this. If a user
enters "B" in cell A1 how could I automatically change the "B" to
"Brazil" for example?

I am looking to create a calendar so when the users enters "B" for a
given date "Brazil" will appear instead of "L".

Thanks,

Brett
 
Maybe try playing with Tools > AutoCorrect Options?
Replace: B
With: Brazil
Click Add > OK
 
Right click sheet tab>view code>insert this to do what you said.
However, I suspect you want a bit more to involve a larger target range and
more choices. You would want a select case statement.

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("a1")) Is Nothing Then
If UCase(Target) = "B" Then Target = "Brazil"
End If
End Sub
 

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