I based the code below in the two cases you provided i.e. if in between word1 there is word2 change it and if in between word1 there is word2 and word3 (I assume they come in that order and always in the two cells in between word1) change them.
The method is a bit crude due to the lack of information, but I understand you may not be able to share more for confidentiality purposes.
Private Sub sub1()
Dim rng As Range
Dim word1 As String, word2 As String, word3 As String
Dim word4 As String, word5 As String, word6 As String
Set rng = Application.InputBox("Input the range you want to substitute", "Input", Type:=8)
word1 = "WordInCell1"
word2 = "WordInCell2"
word3 = "WordInCell3"
word4 = "WordInCell4"
word5 = "WordInCell5"
word6 = "WordInCell6"
For Each c In rng
With c
If .Value = word1 Then
'Check for first case
If .Offset(0, 2).Value = word1 Then
'Check if the word in between the two words1 is word2
If .Offset(0, 1).Value = word2 Then
.Offset(0, 1).Value = word1
End If
'Check for second case
ElseIf .Offset(0, 3).Value = word1 Then
'Check if the two words in between are word2 and word3 - assuming they always come in that order
If .Offset(0, 1).Value = word2 And .Offset(0, 2).Value = word3 Then
.Offset(0, 1).Value = word1
.Offset(0, 2).Value = word1
End If
Else
'Do Nothing
End If
End If
End With
Next c
End Sub