Sub
wverweis()
Dim
auswahl, rng1, rng2
As
Range
Set
auswahl = Rows(11).Find(
"tofind"
, LookIn:=xlValues, lookat:=xlWhole)
If
Not
auswahl
Is
Nothing
Then
Range(Cells(11, 8), Cells(11, auswahl.Column - 1)).
Select
Else
MsgBox
"nix gefunden"
End
If
Set
rng1 = Range(
"F15"
)
Range(
"K40"
).
Select
ActiveCell.FormulaR1C1 =
"=HLOOKUP("
& rng1 &
","
& auswahl &
",1,TRUE)"
Range(
"K40"
).
Select
BZW wie schreibe ich die ausgewählte Range (
Range(Cells(11, 8), Cells(11, auswahl.Column - 1)).
Select
) auf eine Variable, dass ich diese dann einbauen kann?