Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-19-2019, 06:59 AM
enso enso is offline Delete lines with just a number on them - use macro or find & replace? Windows 10 Delete lines with just a number on them - use macro or find & replace? Office 2016
Novice
Delete lines with just a number on them - use macro or find & replace?
 
Join Date: Sep 2017
Posts: 7
enso is on a distinguished road
Default Delete lines with just a number on them - use macro or find & replace?

I have a document and many lines have just a number on them and I want to delete these numbers. They are not the same number, and there are numbers on lines with other text that I do not want to delete.


I tried using find and replace with wildcard elements to find the numbers, but one cannot use new paragraph codes with a wildcard search. I can't figure out how to find the numbers that are on a line by themselves and exclude numbers that are on lines with text.


If this is possible, please clue me in; many thanks!
Reply With Quote
  #2  
Old 05-19-2019, 03:36 PM
macropod's Avatar
macropod macropod is offline Delete lines with just a number on them - use macro or find & replace? Windows 7 64bit Delete lines with just a number on them - use macro or find & replace? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

Try a wildcard Find/Replace with:
Find = ^13[0-9]@^13
Replace = ^p
If the are consecutive paragraphs with just numbers in them, you might need to 'Replace All' a few times to get them all.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 05-20-2019, 02:58 AM
Lugh's Avatar
Lugh Lugh is offline Delete lines with just a number on them - use macro or find & replace? Windows 10 Delete lines with just a number on them - use macro or find & replace? Office 2016
Competent Performer
 
Join Date: May 2019
Location: USA
Posts: 137
Lugh is on a distinguished road
Default

Quote:
Originally Posted by enso View Post
one cannot use new paragraph codes with a wildcard search
One can

It's the ^13 in macropod's post, that replaces ^p in wildcard mode.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete lines with just a number on them - use macro or find & replace? How to find and replace random empty spaces in beginning of lines? Pauliina Word 4 05-24-2018 10:01 PM
Delete lines with just a number on them - use macro or find & replace? Find and Replace/Insert 'CR', delete leading Spaces wherever a user Clicks in a Word document DavidL Word VBA 7 04-04-2018 12:01 AM
How to find number of coma and then add that number of rows in word using macro? PRA007 Word VBA 7 05-27-2015 10:45 PM
Delete lines with just a number on them - use macro or find & replace? Need Help to Find a Number and replace Allen Word 5 11-20-2014 10:33 PM
Delete lines with just a number on them - use macro or find & replace? Find and Replace multiple lines/paragraphs jcw Word 1 11-18-2011 11:47 AM

Other Forums: Access Forums

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