+ Reply to Thread
Results 1 to 6 of 6

Help with Code That Searches for a Blank Row and Deletes it within a Range

  1. #1
    Registered User
    Join Date
    05-13-2014
    MS-Off Ver
    Excel 2010
    Posts
    33

    Help with Code That Searches for a Blank Row and Deletes it within a Range

    Hey guys,

    I am looking to modify my original code for a little more function.

    I have cells B:O, that range from 20 - 300. What I am trying to do is create a function that looks through all of the cells B:O, and if all cells are blank, completely delete the row.

    However I also only want this to occur between the 20 - 300, not to mess with anything outside of that range.

    Any suggestions?

    Please Login or Register  to view this content.

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Help with Code That Searches for a Blank Row and Deletes it within a Range

    One way would be
    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Registered User
    Join Date
    05-13-2014
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Help with Code That Searches for a Blank Row and Deletes it within a Range

    I see how you structured your code and I like it, however it doesnt seem to want to delete anything,

    Do I need to add anything into the code?

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Help with Code That Searches for a Blank Row and Deletes it within a Range

    Do the cells that being deleted contain formulas that evaluate to "", or are they just blank cells?

  5. #5
    Registered User
    Join Date
    05-13-2014
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Help with Code That Searches for a Blank Row and Deletes it within a Range

    completely blank cells

  6. #6
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Help with Code That Searches for a Blank Row and Deletes it within a Range

    As you step through it, is the If line failing to recognize an empty row, or is the .Delete line failing?

+ 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. Need code to searches every row in range and clear rows with sequential numbers.
    By Ochimus in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-08-2013, 10:56 AM
  2. code that searches for a min and max range of data
    By Tanker84 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-20-2013, 02:23 PM
  3. Writing a macro that deletes blank rows
    By britt@wjg in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-11-2008, 02:33 PM
  4. [SOLVED] How to create a macro that deletes every blank row in a spreadshee
    By Grd in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-14-2005, 06:50 PM
  5. RE: How to create a macro that deletes every blank row in a spread
    By Grd in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-14-2005, 06: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