My spreadsheet has over 1000 lines of data. I'm exporting daily so the
information changes and I do not append to the previous day's data. Because
of the way this report exports out of the host system (which I can't change),
at random rows, a cell in a random column is populated with the words quot;System
generatedquot;. I'm running a series of macros to clean up this spreadsheet
before I import to Access. I need a code that will delete the entire row
when this specfic word appears anywhere in the spreadsheet. I've tried
recording a macro using the filter, but this doesn't seem to work since the
data changes daily. Please help!
Chuck
Hi Chuck
See
www.rondebruin.nl/delete.htmgt; data changes daily
You can try EasyFilter to do it
www.rondebruin.nl/easyfilter.htm--
Regards Ron de Bruin
www.rondebruin.nlquot;Chuck Nealquot; gt; wrote in message ...
gt; My spreadsheet has over 1000 lines of data. I'm exporting daily so the
gt; information changes and I do not append to the previous day's data. Because
gt; of the way this report exports out of the host system (which I can't change),
gt; at random rows, a cell in a random column is populated with the words quot;System
gt; generatedquot;. I'm running a series of macros to clean up this spreadsheet
gt; before I import to Access. I need a code that will delete the entire row
gt; when this specfic word appears anywhere in the spreadsheet. I've tried
gt; recording a macro using the filter, but this doesn't seem to work since the
gt; data changes daily. Please help!
gt; Chuck
This sample only looks at the first 100 rows, you can adapt it for your needs:Sub macdel()
Dim L As Long
For L = 100 To 1 Step -1
If Application.CountIf(Rows(L), quot;System generatedquot;) gt;= 1 Then
Rows(L).EntireRow.Delete
End If
Next
End SubThe sample code also assumes that System generated is by itself in a cell.
--
Gary's Studentquot;Chuck Nealquot; wrote:
gt; My spreadsheet has over 1000 lines of data. I'm exporting daily so the
gt; information changes and I do not append to the previous day's data. Because
gt; of the way this report exports out of the host system (which I can't change),
gt; at random rows, a cell in a random column is populated with the words quot;System
gt; generatedquot;. I'm running a series of macros to clean up this spreadsheet
gt; before I import to Access. I need a code that will delete the entire row
gt; when this specfic word appears anywhere in the spreadsheet. I've tried
gt; recording a macro using the filter, but this doesn't seem to work since the
gt; data changes daily. Please help!
gt; Chuck
Ron,
Your Union example did the trick. Thank you VERY much!
Chuck
quot;Ron de Bruinquot; wrote:
gt; Hi Chuck
gt;
gt; See
gt; www.rondebruin.nl/delete.htm
gt;
gt;
gt; gt; data changes daily
gt; You can try EasyFilter to do it
gt; www.rondebruin.nl/easyfilter.htm
gt;
gt;
gt; --
gt; Regards Ron de Bruin
gt; www.rondebruin.nl
gt;
gt;
gt; quot;Chuck Nealquot; gt; wrote in message ...
gt; gt; My spreadsheet has over 1000 lines of data. I'm exporting daily so the
gt; gt; information changes and I do not append to the previous day's data. Because
gt; gt; of the way this report exports out of the host system (which I can't change),
gt; gt; at random rows, a cell in a random column is populated with the words quot;System
gt; gt; generatedquot;. I'm running a series of macros to clean up this spreadsheet
gt; gt; before I import to Access. I need a code that will delete the entire row
gt; gt; when this specfic word appears anywhere in the spreadsheet. I've tried
gt; gt; recording a macro using the filter, but this doesn't seem to work since the
gt; gt; data changes daily. Please help!
gt; gt; Chuck
gt;
gt;
gt;
- Jul 20 Thu 2006 20:08
Delete Row based off cell content
close
全站熱搜
留言列表
發表留言