View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Enter data into a cell that already has a function.

Right click sheet tabview codecopy/paste this.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address < Range("a4").Address Then Exit Sub
Select Case UCase(Target)
Case "DODGE": x = 1
Case "FORD": x = 2
Case "CHEVY": x = 3
Case "PICKUP": x = InputBox("Enter Data")
Case Else
MsgBox "No data entered"
End Select
Range("b4").Value = x
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"alwayslearning" wrote in message
...
Cell B4's value is predicated on the value of cell A4. If cell A4 has a
particular value, I need to be able to type data into cell B4.

A4 = "Dodge" then B4="1"
A4="Ford" then B4="2"
A4="Chevy" then B4="3"
but is A4="Pickup" then B4= data to be typed in

Is there a way to keep the function and still be able to type data into
cell
B4?