+ Reply to Thread
Results 1 to 3 of 3

HOW DO I CREATE A MACRO TO STRIP OUT ROWS?

  1. #1
    Bluenose
    Guest

    HOW DO I CREATE A MACRO TO STRIP OUT ROWS?

    Hi

    I have 11 columns of data (A-K). Some of the cells in column J do not
    contain data. I need to be able to strip out the rows in which there is no
    data in row K and display them seperately on the worksheet or in another
    worksheet.

    Many thanks

  2. #2
    TomHinkle
    Guest

    RE: HOW DO I CREATE A MACRO TO STRIP OUT ROWS?

    either use the advanced filter functionality (off data menu, see help for how
    to use it)
    OR sort by column J, delete all rows where J is blank
    (generally when I do a sorting/re-ordering macro, I'll add a column called
    Order before sorting.. Order is simply a column numbered 1 - x designed to
    maintain the original order)

    "Bluenose" wrote:

    > Hi
    >
    > I have 11 columns of data (A-K). Some of the cells in column J do not
    > contain data. I need to be able to strip out the rows in which there is no
    > data in row K and display them seperately on the worksheet or in another
    > worksheet.
    >
    > Many thanks


  3. #3
    DNA
    Guest

    Re: HOW DO I CREATE A MACRO TO STRIP OUT ROWS?

    This is the code to add a blank row, just reverese:

    Sub InsertRow_At_Change()
    Dim i As Long
    With Application
    .Calculation = xlManual
    .ScreenUpdating = False
    End With
    For i = Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -1
    If Cells(i - 1, 1) <> Cells(i, 1) Then _
    Cells(i, 1).Resize(1, 1).EntireRow.Insert
    Next i
    With Application
    .Calculation = xlAutomatic
    .ScreenUpdating = True
    End With
    End Sub



+ 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