Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default formatting a cell to display a word when i enter a reference lette

I have a very long list of names. I want to create a column that will allow
me to seperate the names into categories: restaurant, store, brand. I want to
format the column to let me enter a letter: r, s , or b, and then the cell
will display: restaurant, store or brand
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default formatting a cell to display a word when i enter a reference lette

An example using column A:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A:A")) Is Nothing Then
Exit Sub
End If
Set r = Target
Application.EnableEvents = False
If r.Value = "r" Then r.Value = "restaurant"
If r.Value = "s" Then r.Value = "store"
If r.Value = "b" Then r.Value = "brand"
Application.EnableEvents = True
End Sub

This is worksheet event code and must be entered in the worksheet code area,
not a standard module.
--
Gary''s Student - gsnu200729


"megan62685" wrote:

I have a very long list of names. I want to create a column that will allow
me to seperate the names into categories: restaurant, store, brand. I want to
format the column to let me enter a letter: r, s , or b, and then the cell
will display: restaurant, store or brand

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default formatting a cell to display a word when i enter a reference lette

Another couple options.

Create 3 new autocorrect options (tools|Autocorrect options)

r$$ replaced with restaurant
s$$ with store
b$$ with brand

Any unique strings (easy to type) would work.

Be aware that these autocorrect rules are shared in the Office suite. You may
want to get rid of them when you're done.



Or turn on Autocomplete.
Tools|Options|edit tab|check Enable AutoComplete for Cell values

As long as your data is close together (in a single column), it may work nicely
for you.

I'd turn this off as soon as I was done--I find it irritating.

megan62685 wrote:

I have a very long list of names. I want to create a column that will allow
me to seperate the names into categories: restaurant, store, brand. I want to
format the column to let me enter a letter: r, s , or b, and then the cell
will display: restaurant, store or brand


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I want to enter a word in a cell and have it duplicate in another Gazelle Excel Worksheet Functions 2 December 14th 06 02:19 AM
Enter data and display function result in same cell ChrisR Excel Discussion (Misc queries) 1 June 21st 06 12:15 AM
Formula to display cell reference (ex.. B7) Irv Excel Worksheet Functions 10 May 9th 06 10:37 AM
how do I get alt-enter to expand word wrap cell GREYL Excel Discussion (Misc queries) 5 November 14th 05 05:28 PM
Enter an Excel cell reference as part of a custom header/footer Suegi123 Excel Worksheet Functions 1 April 1st 05 10:55 PM


All times are GMT +1. The time now is 12:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"