Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-26-2016, 08:52 AM
urbandekay urbandekay is offline Replace a number with one higher Windows 7 64bit Replace a number with one higher Office 2007
Novice
Replace a number with one higher
 
Join Date: Mar 2016
Posts: 12
urbandekay is on a distinguished road
Default Replace a number with one higher


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
Reply With Quote
  #2  
Old 03-26-2016, 03:09 PM
macropod's Avatar
macropod macropod is offline Replace a number with one higher Windows 7 64bit Replace a number with one higher Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,340
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #3  
Old 03-26-2016, 11:56 PM
urbandekay urbandekay is offline Replace a number with one higher Windows 7 64bit Replace a number with one higher Office 2007
Novice
Replace a number with one higher
 
Join Date: Mar 2016
Posts: 12
urbandekay is on a distinguished road
Default

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
Reply With Quote
  #4  
Old 03-27-2016, 12:05 AM
macropod's Avatar
macropod macropod is offline Replace a number with one higher Windows 7 64bit Replace a number with one higher Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,340
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #5  
Old 03-27-2016, 12:08 AM
urbandekay urbandekay is offline Replace a number with one higher Windows 7 64bit Replace a number with one higher Office 2007
Novice
Replace a number with one higher
 
Join Date: Mar 2016
Posts: 12
urbandekay is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
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.
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
Reply With Quote
  #6  
Old 03-27-2016, 12:23 AM
macropod's Avatar
macropod macropod is offline Replace a number with one higher Windows 7 64bit Replace a number with one higher Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,340
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #7  
Old 03-27-2016, 01:16 AM
urbandekay urbandekay is offline Replace a number with one higher Windows 7 64bit Replace a number with one higher Office 2007
Novice
Replace a number with one higher
 
Join Date: Mar 2016
Posts: 12
urbandekay is on a distinguished road
Default

Ok, then is there another means to do it?
Reply With Quote
  #8  
Old 03-27-2016, 01:41 AM
macropod's Avatar
macropod macropod is offline Replace a number with one higher Windows 7 64bit Replace a number with one higher Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,340
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Replace a number with one higher Tasks with higher priorities jamiespear Project 1 02-10-2015 03:29 PM
Replace a number with one higher Need Help to Find a Number and replace Allen Word 5 11-20-2014 10:33 PM
Replace a number with one higher replace number with formatted number 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

Other Forums: Access Forums

All times are GMT -7. The time now is 02:20 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft