Here is an example of the code in such a case
Option Explicit
'-----------------------------------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
'-----------------------------------------------------------------
On Error GoTo ws_exit:
Application.EnableEvents = False
With Target
If .Address = "$A$1" Then
.Offset(0, 1).Value = Application.Index(Range("List2"), _
Application.Match(.Value, Range("List1"), 0))
.Offset(0, 2).Value = Application.Index(Range("List3"), _
Application.Match(.Value, Range("List1"), 0))
ElseIf .Address = "$B$1" Then
.Offset(0, -1).Value = Application.Index(Range("List1"), _
Application.Match(.Value, Range("List2"), 0))
.Offset(0, 1).Value = Application.Index(Range("List3"), _
Application.Match(.Value, Range("List2"), 0))
ElseIf .Address = "$C$1" Then
.Offset(0, -2).Value = Application.Index(Range("List1"), _
Application.Match(.Value, Range("List3"), 0))
.Offset(0, -1).Value = Application.Index(Range("List2"), _
Application.Match(.Value, Range("List3"), 0))
End If
End With
ws_exit:
Application.EnableEvents = True
End Sub
'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.
--
HTH
Bob Phillips
(remove xxx from email address if mailing direct)
Bob Phillips said:
You would need VBA for that, and your lists would have to be in ranges. Is
that the case for you?
--
HTH
Bob Phillips
(remove xxx from email address if mailing direct)
"dolfijntje33" <
[email protected]>
wrote in message