I have a large spreadsheet for tracking missing documents in employee files. I would like to delete all rows that do not contain the text "missing" in any of the columns.
I have a large spreadsheet for tracking missing documents in employee files. I would like to delete all rows that do not contain the text "missing" in any of the columns.
can you attach a sample file ?
If solved remember to mark Thread as solved
Sample_missing.xlsx
This is just a small sample. The actual spreadsheet has about 400 rows. I want to view just the rows with the word "missing" without having to individually delete all the others row by row. Thanks
Hi,
Try this it may help.
David![]()
Sub DeleteRows1() Dim i As Long Application.ScreenUpdating = False For i = Cells(Rows.Count, "C").End(xlUp).Row To 1 Step -1 If Cells(i, "C").Value <> "missing" Then Cells(i, "C").EntireRow.Delete Next i End Sub
Last edited by djfscouse; 10-03-2012 at 02:21 PM. Reason: correcting code
That is deleting all the rows. I'm trying to get the rows that contain the work "missing" to be the only rows left. Thanks
Without VBA, to see only the rows that have "missing" somewhere on the row:
1) In AO1, put "Key"
2) In AO2 put this formula: =COUNTIF(A2:AN2, "Missing") > 0
3) Copy AO2 down the whole data set
4) Click Data > Filter to turn on the Autofilter
5) Click on AO1 and use the filter to see TRUE only
Done. The other rows are hidden, you can work with the "missing" rows and then turn off the autofilter when done.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us? - Ray Kroc
?Actually, I *am* a rocket scientist.? - JB (little ones count!)
Perfect! Thanks!
I have marked this thread solved for you.
In the future please select Thread Tools from the menu above and mark the thread as solved. Thanks.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks