+ Reply to Thread
Results 1 to 5 of 5

If Cell Blank then Delete Row

  1. #1
    Registered User
    Join Date
    05-28-2015
    Location
    Lakeland, FL
    MS-Off Ver
    Excel 13
    Posts
    66

    If Cell Blank then Delete Row

    Please Login or Register  to view this content.
    I have a macro that pulls all the information that I need. At the end I want it to go through Column A and Delete the entire row if the Cell in Column A is blank. The last part of the macro is what I tried to use but it is not working.
    Last edited by Nuccio92; 08-06-2015 at 04:28 PM.

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

    Re: If Cell Blank then Delete Row

    Could be one of the 2 reasons:
    The null strings are derived from a formula
    you have not referenced the sheet name, so the code is looping through a different sheet.

    Option Explicit

    Please Login or Register  to view this content.
    Or if they are truly blank

    Please Login or Register  to view this content.
    Last edited by AB33; 08-06-2015 at 04:46 PM.

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: If Cell Blank then Delete Row

    Try evaluating the Cells(j,"A")

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: If Cell Blank then Delete Row

    Also see http://www.excelforum.com/excel-prog...at-macros.html

    Reason is that according to example file cells in column A are not blank but contain 2 spaces.
    See my last post for solution.

  5. #5
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: If Cell Blank then Delete Row

    Hi Nuccio,

    Thanks for the rep!

    Is your problem solved?

+ 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. [SOLVED] Macro Delete Contents in 23rd corresponding cell if the cell in range is a non-blank cell
    By murtaza.khan in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-04-2014, 01:11 AM
  2. Delete blank cell to the right
    By markos97 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 07-13-2013, 02:10 AM
  3. Replies: 1
    Last Post: 05-10-2012, 04:58 PM
  4. [SOLVED] To delete blank rows having blank cell in the needed raws
    By Alexander_Golinsky in forum Excel General
    Replies: 4
    Last Post: 05-04-2012, 03:11 PM
  5. Replies: 1
    Last Post: 02-17-2012, 10:11 AM
  6. delete row if a cell is blank
    By Steve Mackay in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-20-2006, 10:25 PM
  7. [SOLVED] Delete a row if blank cell
    By mohd21uk via OfficeKB.com in forum Excel General
    Replies: 1
    Last Post: 05-04-2006, 08:45 AM
  8. Delete row if cell in col b is blank
    By claytorm in forum Excel General
    Replies: 4
    Last Post: 11-08-2005, 03:35 PM

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