Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 10-20-2014, 05:02 PM
macropod's Avatar
macropod macropod is offline How can I delete spaces & lines in a table cell Windows 7 64bit How can I delete spaces & lines in a table cell Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

You could use a sequence of wildcard Find/Replaces, where:
Find = [ ]{2,}
Replace = ^32
Find = [ ^13]{1,}
Replace = ^p
Find = [^13]{1,}
Replace = ^p
This will reduce all repeated space & paragraph sequences to one of each, then reduce and combined paragraph/space sequences to just a paragraph break. At worst, you'll be left with cells that have a unnecessary paragraph break in the last paragraph before the end-of-cell marker. No need for VBA, though you could record the above as a macro.

What's not clear, anyway, is what you'd want to do vis-à-vis paragraph beaks and end-of-cell markers.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I delete spaces & lines in a table cell Delete table if cell has data So New2 This Word VBA 1 05-06-2013 09:00 PM
How can I delete spaces & lines in a table cell Extra spaces between the lines after pasting data to Word ramsgarla Word VBA 1 10-29-2012 12:26 AM
How can I delete spaces & lines in a table cell Columns lines in table have spaces and indents in the borders lukester Word Tables 3 07-11-2012 07:01 AM
How can I delete spaces & lines in a table cell Word VBA: Cannot Edit Range (Delete characters except the first in a table cell) tinfanide Word VBA 3 04-27-2012 09:48 AM
Text Wrapping on Fixed Lines in a Form field/Table cell okrmjr Word Tables 0 10-30-2009 08:52 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:43 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