+ Reply to Thread
Results 1 to 4 of 4

Delete Row based off cell content

  1. #1
    Chuck Neal
    Guest

    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. #2
    Ron de Bruin
    Guest

    Re: 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" <[email protected]> wrote in message news:[email protected]...
    > 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. #3
    Gary''s Student
    Guest

    RE: 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. #4
    Chuck Neal
    Guest

    Re: 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" <[email protected]> wrote in message news:[email protected]...
    > > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1