Consulting

Results 1 to 3 of 3

Thread: delete row if column f is blank

  1. #1
    VBAX Regular
    Joined
    Jan 2007
    Posts
    28
    Location

    delete row if column f is blank

    I have a spreadsheet with 5000 rows. I want to delete each row that does not have a value in Column F.

    I appreciate the help.

  2. #2
    VBAX Regular
    Joined
    Feb 2008
    Posts
    54
    Location
    [vba]ActiveSheet.Range("F1:F5000").SpecialCells(xlCellTypeBlanks).EntireRow.Dele te[/vba]

  3. #3
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    [VBA]Sub DelBlanks()
    ActiveSheet.Range("F:F").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
    End Sub
    [/VBA]
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

Posting Permissions

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