Remember Me?
Menu
Home
Search
Today's Posts
Home
Search
Today's Posts
ExcelBanter
»
Excel Newsgroups
»
Excel Discussion (Misc queries)
>
VBA??
LinkBack
Thread Tools
Search this Thread
Display Modes
Prev
Next
#
6
Don Guillett
Posts: n/a
Perhaps you put this macro into a regular module when it needs to go into a
SHEET module.
--
Don Guillett
SalesAid Software
"Monty" wrote in message
...
i have tryed this however nothing happens??
"Gord Dibben" wrote:
Monty
Your subject line is "VBA??"
Unless you use a helper column and a Lookup formula or AutoCorrect VBA
might
be easiest.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rng As Range
Dim vRngInput As Variant
On Error GoTo enditall
Application.EnableEvents = False
Set vRngInput = Intersect(Target, Range("A:A"))
If vRngInput Is Nothing Then Exit Sub
For Each Rng In vRngInput
Select Case Rng.Value
Case 2001: Rng.Value = "Omagh"
Case 2002: Rng.Value = "Craigavon"
Case 2027: Rng.Value = "Housing Benefit"
Case 2036: Rng.Value = "IT Replacement"
End Select
Next Rng
enditall:
Application.EnableEvents = True
End Sub
Right-click on the worksheet tab and "View Code". Copy/paste the above
event
code in there.
As written it operates on Column A.
Enter 2001 in any cell in Column A to return Omagh in that cell.
Gord Dibben Excel MVP
On Wed, 12 Jan 2005 11:31:08 -0800, "Monty"
wrote:
Is there any way i can input certain numbers and they change to words.
for
example.
2001 Omagh
2002 Craigavon
2027 Housing Benefit
2036 IT Replacment
any help please
thanks
monty
Reply With Quote
Thread Tools
Search this Thread
Show Printable Version
Search this Thread
:
Advanced Search
Display Modes
Switch to Linear Mode
Switch to Hybrid Mode
Threaded Mode
Posting Rules
Smilies
are
On
[IMG]
code is
On
HTML code is
Off
Trackbacks
are
On
Pingbacks
are
On
Refbacks
are
On
All times are GMT +1. The time now is
10:14 AM
.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
Contact Us
ExcelBanter forum home
Privacy Statement
LinkBack
LinkBack URL
About LinkBacks