#1
|
|||
|
|||
VBA to find any nine-figure number
HI All
I need to find and replace with a carriage return all occurrences of everything between a "£" sign and the next nine-figure number. So for example all pattern like £4.00 $0.42 477489528 Would be found and replaced with a carriage return. The code would need to run through and replace all such instances. It always starts with the £ sign and ends with a nine-figure number. Can someone help with some code for this? Grateful for any advice. Best Wishes , |
#2
|
|||
|
|||
Try this:
With Selection.Find .Text = "£*[0-9]{9}" .Replacement.Text = Chr(13) .MatchWildcards = True .Execute Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue End With
__________________
Backup your original file before doing any modification. |
#3
|
|||
|
|||
Hi
Yes , that's perfect! Thanks very much for your help. Best Wishes , |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Captioning each figure with the chapter number | jatin1990 | Word | 6 | 03-31-2015 02:34 PM |
How to stop caption number reset (Figure 1) | strathglass | Word | 5 | 06-17-2013 06:06 AM |
Figure number for repeated use in paragraph | rahul4msoffice | Word | 1 | 05-01-2013 11:35 PM |
Refering figure number too text | danzi | Word | 1 | 01-20-2012 12:13 PM |