View Single Post
  #3   Report Post  
L Mieth
 
Posts: n/a
Default

In a previous posting I found exactly what I need except for one problem and
I really know nothing of writing codes.

On 3 14-05 Jason Morin replied to a post from red_oceanus on this same matter.

The code he presented pertains to the first column. I need the message to
work in the fourth column only. When I use his code I recieve a pop up
message in any of the first four columns instead of only the fourth column.

How can I edit this code to suit my needs?

Jason's response follows:
Assuming data entry cells are col. A, right-click the
worksheet tab, choose "View Code", copy in the code
below, and press ALT+Q to close VBE.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim sMsg As String
With Target
If .Column 1 Then Exit Sub
If .Count 1 Then Exit Sub
Application.ScreenUpdating = False
Select Case LCase(.Value)
Case "new instrument"
sMsg = "Call Propertry Accounting"
Case "new house"
sMsg = "Call Inspector"
Case "new car"
sMsg = "Buy Insurance"
Case "robbed"
sMsg = "Buy Gun"
'additional messages here
Case Else
sMsg = "Don't Recognize This"
End Select
MsgBox sMsg
Application.ScreenUpdating = True
End With
End Sub


"cscorp" wrote:


Dear Sir,

There is several ways to accomplish that. Proably the easiest is as
follow:

1. Create a table with the names of all the sites for which you want
alerts.
2. Make a name range for the entire table.
3. Add an additional column to your original table an name it alerts.
4. In that new column Use a VLOOKUP function to verify each new site
you enter.
5. The vertical lookup can place a mark or message in the new column

If you need it additional help let me know.

Regards

Juan Carlos


--
cscorp
------------------------------------------------------------------------
cscorp's Profile: http://www.excelforum.com/member.php...o&userid=24015
View this thread: http://www.excelforum.com/showthread...hreadid=375964