![]() |
|
#1
|
|||
|
|||
![]() Can I use the find and replace function to find a number in a document and replace it with one higher i.e. to replace 4 with 5 and 7 with 8. Or is there some other way to do this? Thanks |
#2
|
||||
|
||||
![]()
Yes, you could do this with Find/Replace. As a rule, if you're incrementing numbers, start at the highest number and work down.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
I tried using various combinations;
find 1-9 replace ?+1 find 1-9 replace *+1 neither work returning the number +1 rather than one integer higher such that so 4 was replaced with 4+1 rather than 5 |
#4
|
||||
|
||||
![]()
That's hardly surprising. If you want to replace 4 with 5 use:
Find = 4 Replace = 5 I can't imagine how you could interpret my previous reply as suggesting you could use some kind of formula as the Replace expression.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
![]()
Yes, I know I can replace 4 with 5 but I want to replace any number with an integer one greater x with x+1
|
#6
|
||||
|
||||
![]()
There is no Find/Replace expression that will do that for any random number. While you can use Find expressions to find any random number, you cannot input a formula that does calculations as a Replace expression.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#7
|
|||
|
|||
![]()
Ok, then is there another means to do it?
|
#8
|
||||
|
||||
![]()
Yes, there are other ways, including macros but I'm not about to write another one without knowing the context and being given information piecemeal. FWIW, if the numbers are part of automatic numbering, cross-references or other fields, a completely different approach would be required.
For an example of what's possible, see: https://www.msofficeforums.com/word/...html#post74812 https://www.msofficeforums.com/word/...html#post16171
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
jamiespear | Project | 1 | 02-10-2015 03:29 PM |
![]() |
Allen | Word | 5 | 11-20-2014 10:33 PM |
![]() |
antoniob | Word | 5 | 06-17-2014 02:32 PM |
Layout: Numbered long headings on level 10 or higher | Katarina | Word | 3 | 05-07-2014 02:56 PM |
Top of 2nd page higher than 1st | Anne at ppf | Word | 7 | 03-23-2013 07:55 AM |