Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Closed Thread
 
Thread Tools Display Modes
  #16  
Old 12-27-2017, 10:30 PM
ewso ewso is offline delete rows not containing certain text Windows 10 delete rows not containing certain text Office 2016
Advanced Beginner
delete rows not containing certain text
 
Join Date: Nov 2016
Posts: 80
ewso is on a distinguished road
Default

All I now have is a blank worksheet. If I have a worksheet with 100 rows and 20 of the rows have the word "coffee" in them, and 20 other rows have the word "cups" in them, I need to delete only the 60 rows that don't have either word in them. If a row has either word, I need to keep it.
  #17  
Old 12-28-2017, 08:43 AM
NoSparks NoSparks is offline delete rows not containing certain text Windows 7 64bit delete rows not containing certain text Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 831
NoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really nice
Default

If I suggest a solution, you wouldn't know if it works (for you) without testing it on something.
How about attaching that something so I can verify my suggestion before posting it as I'm no longer interested in guessing what you're dealing with or what your data looks like.
  #18  
Old 12-28-2017, 11:15 AM
ewso ewso is offline delete rows not containing certain text Windows 10 delete rows not containing certain text Office 2016
Advanced Beginner
delete rows not containing certain text
 
Join Date: Nov 2016
Posts: 80
ewso is on a distinguished road
Default

I guess there's no macro for this...moderator delete please. thanks.

Last edited by ewso; 12-29-2017 at 11:14 AM.
  #19  
Old 12-29-2017, 01:13 PM
NoSparks NoSparks is offline delete rows not containing certain text Windows 7 64bit delete rows not containing certain text Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 831
NoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really nice
Default

@ ewso
over 9 months ago in post #6 it was suggested posting a sample workbook so we would all be dealing with the same thing.
You're now suffering the consequences of not doing so. When you don't help people willing to help you, they inevitably ignore you.

All through this thread you've said rows that don't contain
... there's 16,384 cells in a row, so you'd need to check them all. Right ?

Apparently NOT. What you've now deleted indicates rows that don't contain is misleading.

Now you've asked to have this thread deleted.

If you read this before the deletion and are inclined to create your own macro...
. determine the last row of column A
. step -1 from last row to first row
. use Instr to check for words in the A column cell of the row
. if Instr gives 0 for each word then Acolumncell.entirerow.delete
  #20  
Old 12-29-2017, 08:22 PM
NoSparks NoSparks is offline delete rows not containing certain text Windows 7 64bit delete rows not containing certain text Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 831
NoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really nice
Default

Hey ewso, see how quick and easy it is to get the right help when you let it be known what you're working with right at the start.
Glad you were able to learn something from this thread.
  #21  
Old 12-30-2017, 01:07 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline delete rows not containing certain text Windows 7 64bit delete rows not containing certain text Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,779
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Cross post no links - Solved elsewhere - Thread closed
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Closed Thread



Similar Threads
Thread Thread Starter Forum Replies Last Post
delete rows not containing certain text Macro to delete rows not containing specific text Alimou Excel Programming 4 02-06-2017 07:35 AM
delete rows not containing certain text Delete blank rows between the two rows that contain data beginner Excel Programming 5 12-26-2014 12:29 AM
delete rows not containing certain text Delete All empty Rows - Print - Undo all Rows deleted Bathroth Word VBA 1 10-01-2014 01:40 PM
delete rows not containing certain text Delete Blank Rows (Cyrillic Text in Spreadsheet ) dozd Excel 1 02-22-2013 03:24 AM
delete rows not containing certain text Delete all rows but the last. elky1967 Word VBA 14 09-21-2012 05:27 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:38 PM.


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