M
Mary Beth
I think I'm not using quite the right term here.
Sub Tester()
s = ActiveCell.Value
sParseTerm = Selection.Offset(0,
1).Range(ActiveCell.Address).Value
TermPos = InStr(1, s, sParseTerm, vbTextCompare)
If TermPos > 0 Then
s = Left(s, TermPos - 2) & Mid(s, TermPos + Len(sParseTerm))
ActiveCell.Value = s
End If
sParseTerm = Selection.Offset(0,
2).Range(ActiveCell.Address).Value
TermPos = InStr(1, s, sParseTerm, vbTextCompare)
If TermPos > 0 Then
s = Left(s, TermPos - 2) & Mid(s, TermPos + Len(sParseTerm))
ActiveCell.Value = s
End If
End Sub
This line doesn't seem to do quite what I'm thinking it does.
sParseTerm = Selection.Offset(0, 1).Range(ActiveCell.Address).Value
I think it should be taking the address of the active cell, and getting
the value of the cell next to it. Unfortunately, I think it's actually
taking a value from the 1rst row, 2nd column or something.
Is there a different term I should be using?
Sub Tester()
s = ActiveCell.Value
sParseTerm = Selection.Offset(0,
1).Range(ActiveCell.Address).Value
TermPos = InStr(1, s, sParseTerm, vbTextCompare)
If TermPos > 0 Then
s = Left(s, TermPos - 2) & Mid(s, TermPos + Len(sParseTerm))
ActiveCell.Value = s
End If
sParseTerm = Selection.Offset(0,
2).Range(ActiveCell.Address).Value
TermPos = InStr(1, s, sParseTerm, vbTextCompare)
If TermPos > 0 Then
s = Left(s, TermPos - 2) & Mid(s, TermPos + Len(sParseTerm))
ActiveCell.Value = s
End If
End Sub
This line doesn't seem to do quite what I'm thinking it does.
sParseTerm = Selection.Offset(0, 1).Range(ActiveCell.Address).Value
I think it should be taking the address of the active cell, and getting
the value of the cell next to it. Unfortunately, I think it's actually
taking a value from the 1rst row, 2nd column or something.
Is there a different term I should be using?