Sub
test()
Dim
rngBereichX
As
Range, rngBereichY
As
Range
Dim
rngX
As
Range, rngY
As
Range
Dim
x
As
Long
, y
As
Long
Dim
strX
As
String
, strY
As
String
strX = InputBox(
"X-Wert suchen"
,
"X-Wert"
)
If
strX =
""
Then
Exit
Sub
strY = InputBox(
"Y-Wert suchen"
,
"Y-Wert"
)
If
strY =
""
Then
Exit
Sub
Set
rngBereichX = Range(
"A1:J1"
)
Set
rngBereichY = Range(
"A1:A10"
)
Set
rngX = rngBereichX.Find(strX, LookIn:=xlValues, lookat:=xlWhole)
If
Not
rngX
Is
Nothing
Then
x = rngX.Column
Else
MsgBox
"nix gefunden"
Exit
Sub
End
If
Set
rngY = rngBereichY.Find(strY, LookIn:=xlValues, lookat:=xlWhole)
If
Not
rngY
Is
Nothing
Then
y = rngY.Row
Else
MsgBox
"nix gefunden"
Exit
Sub
End
If
MsgBox Cells(y, x).Value
End
Sub