Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-26-2016, 06:51 PM
ewso ewso is offline backspace every line one space Windows 10 backspace every line one space Office 2016
Advanced Beginner
backspace every line one space
 
Join Date: Nov 2016
Posts: 80
ewso is on a distinguished road
Default backspace every line one space

If I have vertical text like this:

1
2


3
4
5
6
7
8


...and I want to back space every line onto the previous line throughout the whole document, so that it would look like this:

12
34
56
78


...how would I do it?
Reply With Quote
  #2  
Old 11-26-2016, 07:42 PM
macropod's Avatar
macropod macropod is offline backspace every line one space Windows 7 64bit backspace every line one space Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

Youy could use a wildcard Find/Replace, where:
Find = ([0-9]{1,})[^13^l]([0-9]{1,}[^13^l])
Replace = \1\2
or:
Find = ([!^13]{1,})[^13^l]([!^13]{1,}[^13^l])
Replace = \1\2

The first one will work only on lines/paragraphs containing numbers; the second with any content.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 11-26-2016, 09:25 PM
ewso ewso is offline backspace every line one space Windows 10 backspace every line one space Office 2016
Advanced Beginner
backspace every line one space
 
Join Date: Nov 2016
Posts: 80
ewso is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
Youy could use a wildcard Find/Replace, where:
Find = ([0-9]{1,})[^13^l]([0-9]{1,}[^13^l])
Replace = \1\2
or:
Find = ([!^13]{1,})[^13^l]([!^13]{1,}[^13^l])
Replace = \1\2

The first one will work only on lines/paragraphs containing numbers; the second with any content.

hey, thanks for the help, but the second formula you gave me, which is what I need since I'm not just working with numbers, is only working like this:

1
2
34
5

1
2
34
5

...as you can see, it's only working on every fourth line. Any advice?
Reply With Quote
  #4  
Old 11-26-2016, 10:09 PM
macropod's Avatar
macropod macropod is offline backspace every line one space Windows 7 64bit backspace every line one space Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

I tested both Find/Replace expressions before posting. For content as depicted in your posts they both work.

Do note that extraneous empty lines between the numbers will throw things off; so too will having the insertion point (selection cursor) anywhere within the numbered range.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 11-29-2016, 03:44 PM
ewso ewso is offline backspace every line one space Windows 10 backspace every line one space Office 2016
Advanced Beginner
backspace every line one space
 
Join Date: Nov 2016
Posts: 80
ewso is on a distinguished road
Default

This is specifically what I need to do:
I have mostly four-line text blocks separated by space throughout thousands of pages like this:

1
2
3
4

1
2
3
4

1
2
3
4

...and I need to make every text block look like this:

1234

1234

1234

I basically need to move the bottom three lines onto the first line in every text block, and I don't care if the space is removed afterwards, so that it looks like this:

1234
1234
1234

...How can I do this?
Reply With Quote
  #6  
Old 11-29-2016, 04:12 PM
macropod's Avatar
macropod macropod is offline backspace every line one space Windows 7 64bit backspace every line one space Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

The Find/Replace expression I provided will already do that. Running it once converts:
1
2
3
4
5
6
7
8
to:
12
34
56
78
Running it a second time will give you:
1234
5678
It won't remove extraneous lines between individual numbers or groups of numbers, though.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #7  
Old 11-29-2016, 04:29 PM
ewso ewso is offline backspace every line one space Windows 10 backspace every line one space Office 2016
Advanced Beginner
backspace every line one space
 
Join Date: Nov 2016
Posts: 80
ewso is on a distinguished road
Default

It doesn't do that. It does what I stated earlier:

1
2
34

1
2
34

...And if I keep running it, it eventually just tells me 0 replacements were made, yet there's still 3 lines of text in every text block when there should only be one.
Reply With Quote
  #8  
Old 11-29-2016, 05:03 PM
macropod's Avatar
macropod macropod is offline backspace every line one space Windows 7 64bit backspace every line one space Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

Kindly don't contradict me. It does precisely what I said it does for data as you described. If it's not working for you it's because your data are not as described.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #9  
Old 11-29-2016, 05:28 PM
ewso ewso is offline backspace every line one space Windows 10 backspace every line one space Office 2016
Advanced Beginner
backspace every line one space
 
Join Date: Nov 2016
Posts: 80
ewso is on a distinguished road
Default

What potential things in my document would cause it to not work?

Edit: I apologize. It turns out that I just needed to remove all the formatting from the document, and now it works. Thanks a lot.
Reply With Quote
  #10  
Old 11-29-2016, 07:10 PM
macropod's Avatar
macropod macropod is offline backspace every line one space Windows 7 64bit backspace every line one space Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

This really has nothing to do with formatting. As I have already indicated:
Quote:
extraneous empty lines between the numbers will throw things off; so too will having the insertion point (selection cursor) anywhere within the numbered range.
For the first Find/Replace expression I posted, so to would any extraneous non-numeric content (e.g. tabs, spaces, letters).
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
backspace every line one space Footnote space line Olle Word 3 10-24-2015 08:52 AM
backspace every line one space Alignment of wording at the top of the line space charles_cat Word 1 03-03-2015 02:58 AM
backspace every line one space Simple question about line space danezcou3 Word 1 04-21-2013 05:38 AM
printing whole line of text on one space! stewarta13wsb Word 4 06-20-2012 04:43 PM
Two Issues Remove Line and unwanted space WorkerB Word 3 07-25-2011 11:38 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:38 AM.


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