Private
Sub
Worksheet_Change(
ByVal
Target
As
Range)
Dim
raFund
As
Range
Application.ScreenUpdating =
False
If
Target.Address(0, 0) =
"D105"
Then
If
Target.Value =
""
Then
Range(Cells(109, 4), Cells(110, 29)).ClearContents
Exit
Sub
End
If
Set
raFund = Worksheets(
"Database"
).Columns(
"B:B"
).Find(what:=Target.Value, LookIn:=xlValues, lookat:=xlWhole)
If
Not
raFund
Is
Nothing
Then
Range(Cells(109, 4), Cells(110, 29)).ClearContents
Worksheets(
"Database"
).Range(
"B12:AA12"
).Copy Cells(109, 4)
Worksheets(
"Database"
).Range(
"B"
& raFund.Row &
":AA"
& raFund.Row).Copy _
Cells(110, 4)
Else
MsgBox
"Der Suchbegriff "
& Target.Value &
" ist nicht vorhanden."
End
If
End
If
Set
raFund =
Nothing
Application.ScreenUpdating =
True
End
Sub