Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
use the following worksheet event code. Put this in your worksheet module: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub If Intersect(Target, Me.Range("C13:C15")) Is Nothing Then Exit Sub End If with target if .value = "AL" or .value="HDAY" then msgbox "You entered: " & .value end if end with End Sub -- Regards Frank Kabel Frankfurt, Germany Matt wrote: I have a range of cells(C13:C15) that the user inputs data. There are actually more cells that I want to check, but this is a sample. What I want is for Excel to check the cell after the user inputs data to see if they put in "AL" or "HDAY". If they put in "AL", then I want a messagebox to come up saying that they entered "AL" and the same for if they enter "HDAY". If they enter anything else in the cell, I don't want it to do anything. I want this code to run everytime a user inputs data in this range of cells. Thanks in advance. Matt |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
change cell contents when pull down menu choices change | Excel Worksheet Functions | |||
Insert new row as cell contents change | Excel Discussion (Misc queries) | |||
MsgBox for a range and not one cell change please: | Excel Programming | |||
Please help! Macro to change cell contents based on cell to the left | Excel Programming | |||
Run macro when cell contents change | Excel Programming |