+ Reply to Thread
Results 1 to 5 of 5

Delete any blank rows from specific columns

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    07-16-2012
    Location
    Fort Worth, Texas
    MS-Off Ver
    Excel 2010
    Posts
    378

    Delete any blank rows from specific columns

    Hello,

    I'm looking for a vba that can delete any banks rows from specific column B. Range from B56 to B3500. If any blank cells in this area will be deleted. Appreciate if you can help.

  2. #2
    Forum Contributor
    Join Date
    07-24-2012
    Location
    Denver, CO
    MS-Off Ver
    365
    Posts
    230

    Re: Delete any blank rows from specific columns

    Sub DeleteBlanks()
    Dim letter As Range
    
    For Each letter In Range("B1: B3500").SpecialCells(xlCellTypeBlanks)
    If letter = "" Then
    letter.EntireRow.ClearContents
    End If
    Next letter
    End Sub
    If you just want to remove the contents from cell B then take out ".EntireRow"
    Last edited by LaffyAffy13; 07-23-2013 at 03:37 PM. Reason: Fixed information
    ~~LaffyAffy13~~

    If I have helped you solve your problem, please be sure to click at the bottom left of my post.

    Thanks.

  3. #3
    Forum Contributor
    Join Date
    07-16-2012
    Location
    Fort Worth, Texas
    MS-Off Ver
    Excel 2010
    Posts
    378

    Re: Delete any blank rows from specific columns

    Thank you.

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Delete any blank rows from specific columns

    Sub pelle()
    Range("B56", Cells(Rows.Count, 2).End(xlUp)).SpecialCells(4).EntireRow.Delete
    End Sub

  5. #5
    Forum Contributor
    Join Date
    07-24-2012
    Location
    Denver, CO
    MS-Off Ver
    365
    Posts
    230

    Re: Delete any blank rows from specific columns

    Read the question wrong, my code just clears the contents. AB's code does the job correctly. Sorry

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Delete 1 to 8 rows. Do text to columns to specific columns.
    By niceblue in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-06-2013, 10:53 AM
  2. [SOLVED] VBA Find last row and column that contain data and delete all blank rows and blank columns
    By bcn1988 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-03-2012, 01:07 PM
  3. delete rows where a cell is blank in specific column
    By GottaRun in forum Excel General
    Replies: 3
    Last Post: 03-07-2006, 01:40 AM
  4. [SOLVED] Delete rows that contain blank columns
    By Lindsey in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-08-2005, 06:40 PM
  5. [SOLVED] To Delete the specific rows when blank is found on column A
    By ddiicc in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-05-2005, 01:05 AM

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