+ Reply to Thread
Results 1 to 8 of 8

delete rows with blank cells

  1. #1
    Forum Contributor
    Join Date
    10-11-2008
    Location
    Chennai,India
    MS-Off Ver
    2007,2003
    Posts
    123

    delete rows with blank cells

    Dear All,

    I want to delete the rows which have consecutive 4 blank cells. There are thousands of rows to check and delete. How to do it fast and efficiently?

    Looking forward for your suggestion.

    With sincere regads,
    Upananda
    Attached Files Attached Files
    Upananda

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    Re: delete rows with blank cells

    Are the 4 blank rows specific to some column?
    Cheers!
    Deep Dave

  3. #3
    Forum Contributor
    Join Date
    10-11-2008
    Location
    Chennai,India
    MS-Off Ver
    2007,2003
    Posts
    123

    Re: delete rows with blank cells

    Yes it is specific to all the columns in the worksheet which has data as per the company names given in the first column A.

  4. #4
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    Re: delete rows with blank cells

    But how can that be tackled! Think of it this way, if column B has 4 Blank rows and Column C has 5 blank rows (4 On same rows as on Column B) if my code detects 4 blank rows on B column and deletes those rows, then Column C will now have only 1 Blank row. Which now wont be detected by the code and will be left alone..

  5. #5
    Forum Contributor
    Join Date
    10-11-2008
    Location
    Chennai,India
    MS-Off Ver
    2007,2003
    Posts
    123

    Re: delete rows with blank cells

    I want to read the data by rows as every row represent specific company. Column represents the year. To make it easy i want the first five column of the data i.e, B-F. sorry for not being clear in my previous reply.

  6. #6
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    Re: delete rows with blank cells

    I want to delete the rows which have consecutive 4 blank cells.
    Then I guess you mean you want to Delete the Company if, 1st 5 Columns are blank.. Is that right?

    For example, Row No 48 (Raj Oil Mills Ltd.), should be deleted as Cells (B48,C48,D48,E48,F48) are all blank. Is that right?
    Last edited by NeedForExcel; 04-09-2015 at 06:36 AM.

  7. #7
    Forum Contributor
    Join Date
    10-11-2008
    Location
    Chennai,India
    MS-Off Ver
    2007,2003
    Posts
    123

    Re: delete rows with blank cells

    Yes sir, your are right.

  8. #8
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    Re: delete rows with blank cells

    You dont really need VBA for that.

    Insert a Column between G & H Columns and put this formula on Cell G5.

    =B5&C5&D5&E5&F5

    And Drag it down till the last row.

    Then apply AutoFilter & Look for Blanks (The last option) and then get rid of the rows..

    Hope this helps!

    If you still need VBA, let me know

+ 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. Using code to delete rows with blank cells in them upon opening the workbook
    By marielouise1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-12-2014, 02:00 PM
  2. [SOLVED] Macro to delete rows with blank cells
    By Newby2012 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-04-2012, 04:43 AM
  3. Code to delete partial rows based on blank cells
    By scaffdog845 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-08-2010, 04:15 AM
  4. Replies: 2
    Last Post: 04-29-2009, 12:07 PM
  5. How to delete rows that include blank/null cells
    By kostas in forum Excel General
    Replies: 5
    Last Post: 04-27-2007, 07:47 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