tonywatsonhelp
Well-known Member
- Joined
- Feb 24, 2014
- Messages
- 3,210
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
Hi Everyone,
I have this bit of code that finds a word then removes other parts from the sentance in the cell, but I need it to find all of them not just one.
here is the code:
So as you can see it looks for the word
I have this bit of code that finds a word then removes other parts from the sentance in the cell, but I need it to find all of them not just one.
here is the code:
Code:
Sub Testit1()
Set rngX11 = ActiveSheet.Cells.Find("Structure", lookat:=xlPart)
rngX11.Replace What:="""", Replacement:="", lookat:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
rngX11.Replace What:=".", Replacement:="", lookat:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
End Sub
So as you can see it looks for the word
"Structure" anywhere in the sheet, and when it finds it it replaces all "" with nothing and all . with nothing
but I have more than one word of
</strike>
but I have more than one word of
"Structure" and I need it to do this with everyone.
I can't just use replace on the sheet as there is data that needs the . and the ""
the cell will always begin with the word
<strike>I can't just use replace on the sheet as there is data that needs the . and the ""
the cell will always begin with the word
Structure if that helps.
Please help if you can
Thanks
Tony
Please help if you can
Thanks
Tony
</strike>