Select Case
Jim, that is close to what I need. I'm sorry for the thin description. I have
a sheet that is used to schedule employees. Col A is for names, B is for
start time, C is for end time and D is for hours worked. When someone is
scheduled for vacation, sick time, or a holiday I want to be able to enter
the appropriate letter in column B and have it return 8 (as in hours) for
that employee.
"Jim Thomlinson" wrote:
Your description is a little thin. Here is some event code that responds to
changes in column A and places a value beside the cell that was changed.
Right click the sheet tab and select view code. Paste the following...
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then
Select Case UCase(Target.Value)
Case "A", "H", "V"
Target.Offset(0, 1).Value = 8
Case Else
MsgBox "Not A, H or V."
End Select
End If
End Sub
--
HTH...
Jim Thomlinson
"MikeG" wrote:
I would like to be able to enter the letters "V", "H" or "A" into a cell and
have the number 8 entered into another cell. How can this be done using
Select Case?
|