Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Chuck Neal
 
Posts: n/a
Default Delete Row based off cell content

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 "System
generated". 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
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ron de Bruin
 
Posts: n/a
Default Delete Row based off cell content

Hi Chuck

See
http://www.rondebruin.nl/delete.htm


data changes daily

You can try EasyFilter to do it
http://www.rondebruin.nl/easyfilter.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Chuck Neal" wrote in message ...
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 "System
generated". 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



  #3   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
Posts: n/a
Default Delete Row based off cell content

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), "System generated") = 1 Then
Rows(L).EntireRow.Delete
End If
Next
End Sub


The sample code also assumes that System generated is by itself in a cell.
--
Gary's Student


"Chuck Neal" wrote:

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 "System
generated". 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

  #4   Report Post  
Posted to microsoft.public.excel.misc
Chuck Neal
 
Posts: n/a
Default Delete Row based off cell content

Ron,
Your Union example did the trick. Thank you VERY much!
Chuck

"Ron de Bruin" wrote:

Hi Chuck

See
http://www.rondebruin.nl/delete.htm


data changes daily

You can try EasyFilter to do it
http://www.rondebruin.nl/easyfilter.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Chuck Neal" wrote in message ...
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 "System
generated". 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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Colour Cell based on Content Steve Excel Worksheet Functions 3 March 10th 06 03:51 PM
How to lookup row # based on content of another column's cell Mr. Jan Park Excel Worksheet Functions 7 November 2nd 05 12:58 AM
How can I populate an Excel cell based on the data in another cell JerseyBoy Excel Worksheet Functions 3 September 30th 05 03:53 PM
Linking a cell to another workbook cell based on a variable name Brian Excel Discussion (Misc queries) 6 June 1st 05 11:54 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 01:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"