+ Reply to Thread
Results 1 to 12 of 12

skip any row with an empty cell

  1. #1
    Registered User
    Join Date
    03-16-2015
    Location
    Egypt
    MS-Off Ver
    2010
    Posts
    51

    skip any row with an empty cell

    hi all
    I have an excel problem that I hope you can help me out with...
    I have a code to Inserting blank row after every row with data

    HTML Code: 
    I try to find out how to skip any row with an empty cell but I could't

    Thanks in advance !!

  2. #2
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: skip any row with an empty cell

    I am little confused about requirement. Try this if you are looking for that.
    Add this line :
    Please Login or Register  to view this content.
    After this line :
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-16-2015
    Location
    Egypt
    MS-Off Ver
    2010
    Posts
    51

    Re: skip any row with an empty cell

    First of all thank you for your time , but again,
    I have a data in range (b8 ) to last used cell in column b
    all cells with data expect some cells say : b15 b25 b27 b30
    i need to Insert a blank row after every cell with data and skip any empty cell
    Any suggestions ?

  4. #4
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: skip any row with an empty cell

    Ok. Then replace this line :
    Please Login or Register  to view this content.
    With this line :
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-16-2015
    Location
    Egypt
    MS-Off Ver
    2010
    Posts
    51

    Re: skip any row with an empty cell

    sorry mr.sanram
    it's stopping at the first empty cell

    Hope it is clear

  6. #6
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: skip any row with an empty cell

    May be you are doing something wrong. Here is entire code. Just copy and paste this. Then let me know what happened there.
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    03-16-2015
    Location
    Egypt
    MS-Off Ver
    2010
    Posts
    51

    Re: skip any row with an empty cell

    Hi mr.sanram,
    Tested it out! It works like a charm!

    Just a point :
    I replaced Fr = ActiveSheet.Range("B8").Offset(1).Row
    with
    Fr = ActiveSheet.Range("B8").Row

    Thank you very much for all this great help and for your patience with me
    Have a good day from egypt.
    Regards

  8. #8
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: skip any row with an empty cell

    You are welcome.

  9. #9
    Registered User
    Join Date
    03-16-2015
    Location
    Egypt
    MS-Off Ver
    2010
    Posts
    51

    Re: skip any row with an empty cell

    sorry mr.sanram
    I tested the code again
    if all cells are full with data it works for me and adds 1 empty row
    if any cell is empty it works for me and adds 1 empty row after any empty cell
    Please see the attached file for more details.
    I'm sorry again

  10. #10
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: skip any row with an empty cell

    Then you want to remove the empty row, not to skip. Anyway. Here is the code for that :
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    03-16-2015
    Location
    Egypt
    MS-Off Ver
    2010
    Posts
    51

    Re: skip any row with an empty cell

    Hi mr.sanram,
    it works exactly as i hoped
    Thank you veryyyyyyyyyyyyyyyyy much for your patience, time and solution, really appreciated.
    Regards
    Mokhtar

  12. #12
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: skip any row with an empty cell

    You are welcome.

+ 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] How to skip an empty cell in a column?
    By excelkann in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-19-2016, 12:20 PM
  2. Skip line if cell is empty
    By Krist2 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-03-2015, 09:56 AM
  3. Skip empty cell in formula
    By Jeebos in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-01-2014, 03:00 PM
  4. [SOLVED] Need help : Vlookup/index with skip blank/empty cell, problem!!!!
    By Jhon Mustofa in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-25-2013, 12:18 AM
  5. Skip to empty row or Creating a log
    By vikshrasss in forum Excel General
    Replies: 1
    Last Post: 01-25-2013, 11:24 AM
  6. [SOLVED] Skip/Do not run Macro on the cell if empty/blank
    By Talazem in forum Excel General
    Replies: 3
    Last Post: 11-01-2012, 06:25 PM
  7. [SOLVED] If cell is empty then run macro otherwise skip this macro
    By alexmillner@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-12-2006, 11:00 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