+ Reply to Thread
Results 1 to 5 of 5

Delete Blank Rows in A Specified Range

  1. #1
    Registered User
    Join Date
    12-18-2012
    Location
    Lafayette, Louisiana
    MS-Off Ver
    Excel 2010
    Posts
    5

    Delete Blank Rows in A Specified Range

    I would like a mcro that will specify a condition in a cell & then delete specified rows based on that condition being true (Ex: If B3 = "", then delete rows 3 thry 39)

  2. #2
    Forum Contributor
    Join Date
    10-08-2010
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    386

    Re: Delete Blank Rows in A Specified Range

    Try this. Where it says YOUR RANGE HERE just put Range("A:A") or whatever column you need. I have bolded the criteria line. you can base this on a cell value or throw a variable in there that is determined by the user. Let me know if you need some more help getting this to work exactly how you want it.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-18-2012
    Location
    Lafayette, Louisiana
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Delete Blank Rows in A Specified Range

    Not really what I wanted. What I am looking foro is a macro where I can specify if cell B3's value ="", delete rows 3 thru 39 & then if cell B40's value="", delete rows 42 thru 78 & then if cell B79's value="", then delete rows 81 thru 117 & then cell B119's value ="", delete rows 117 thru 153. Something like this. 3 thru 39 might be blank, 42 thru 78 has data, 81 thru 117 is blank & 81 thru 117 has data. End result would be specified areas that have data would move up.

  4. #4
    Forum Contributor
    Join Date
    10-08-2010
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    386

    Re: Delete Blank Rows in A Specified Range

    oh ok haha

    Please Login or Register  to view this content.
    you'll want to work from the bottom up, as deleting entire rows will will change the reference cell. as in if you delete 3 through 39, 42 through 78 now become 6 through 42.

  5. #5
    Registered User
    Join Date
    12-18-2012
    Location
    Lafayette, Louisiana
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Delete Blank Rows in A Specified Range

    Thank You - This worked


    Quote Originally Posted by GaidenFocus View Post
    oh ok haha

    Please Login or Register  to view this content.
    you'll want to work from the bottom up, as deleting entire rows will will change the reference cell. as in if you delete 3 through 39, 42 through 78 now become 6 through 42.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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