Hallo, AndreasBess,
Du solltest vilelicht in einem englisch-sprachigen Forum die Frage auf englisch stellen, wenn Du zeitnah eine Antowrt erhalten möchtest.
VBA spricht ebenso wie ein Großteil der Teilnehmer an diesem Forum englisch, und mölglicherweise solltest Du per Makro-Rekorder die Schritte aufzeichnen, um eine Grundlage für den Code und die Anweisungen zu erhalten.
Den Satz nach dem End Sub habe ich leider nicht verstanden und kann ihn daher auch nicht im Code umsetzen
---
Hi, Andreas,
you should consiuder that most participanmts of VBA Express are people who understand english but only a small percentage will care to answer to a thread in German.
Same goes for most of the keywords that are being used in VBA Code: they are in english and you would need them in that way to work. Maybe it would be a good idea to record some basic features with the macro-recorder turned on and have a look at the code which is produced (it could be worked on to be more efficient).
Sorry I didn´t get the meaning of the words after the End Sub so I´m afraid I couldn´t code for that.
Sub tst()
Dim r As Range
Set r = Sheets("Kalkulation Stammdaten").Range("M1:M1000")
With Sheets("Eingabemaske")
r.Replace What:=.Range("P7").Value, Replace:=.Range("K2").Value, LookAt:=xlPart
r.Replace What:=.Range("P8").Value, Replace:=.Range("K3").Value, LookAt:=xlPart
r.Replace What:=.Range("P9").Value, Replace:=.Range("K4").Value, LookAt:=xlPart
End With
Set r = Nothing
End Sub
Sub tst_Loop()
Dim r As Range
Dim lngLoop As Long
Set r = Sheets("Kalkulation Stammdaten").Range("M1:M1000")
With Sheets("Eingabemaske")
For lngLoop = 7 To 9
r.Replace What:=.Range("P" & lngLoop).Value, Replace:=.Range("K" & lngLoop - 5).Value, LookAt:=xlPart
Next lngLoop
End With
Set r = Nothing
End Sub
HTH,
Holger