![]() |
|
#1
|
|||
|
|||
![]()
Perhaps a different approach. This works for your example:
Code:
Sub ScratchMacro() 'A basic Word macro coded by Greg Maxey Dim oRng As Range Dim oCell As Cell For Each oCell In Selection.Tables(1).Range.Cells Set oRng = oCell.Range If Len(oCell.Range.Text) > 2 Then oRng.Collapse wdCollapseEnd oRng.Move wdCharacter, -1 Do Until oRng.Characters.First.Previous Like "[A-Za-hj-uwyz.]" 'the Roman numberals could be a problem but few words end in 'i, v or x" oRng.Select oRng.MoveStart wdCharacter, -1 Loop oRng.HighlightColorIndex = wdBrightGreen 'or delete the range End If Next lbl_Exit: Exit Sub Last edited by gmaxey; 11-14-2020 at 04:23 PM. |
![]() |
Tags |
find & replace w/ nothing |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Advanced Find and Replace with Wildcards help needed | Amapola188 | Word | 3 | 07-23-2019 10:54 PM |
![]() |
arunchandar9 | Word VBA | 15 | 06-30-2019 01:06 AM |
![]() |
WeyldFalcon | Word | 4 | 11-15-2016 12:48 PM |
Using wildcards how do I Find and Add to, not replace | Stargehzer | Word | 3 | 01-25-2016 09:14 PM |
Find & Replace: Wildcards (except this pattern) | tinfanide | Word | 6 | 01-26-2014 06:39 AM |