Hi,

I'm in need of a VBA code that removes everything in a cell after a specific word + the word itself in the active sheet and/or selection. Perhaps this can be done in 2 separate codes. (one for full sheet and one for selection)

In the following example we want to remove the "word_to_replace" and everything after that. We are going to search for the word "or":
VBA or VB
VBA OR C#
C# ororor or C++

After executing the code in the current active sheet I want the result to be:

VBA
VBA
C# ororor

Anyone?

Thanks in advance.