+ Reply to Thread
Results 1 to 7 of 7

Delete vs Hide rows code not working

  1. #1
    Registered User
    Join Date
    02-22-2013
    Location
    Chicago, IL
    MS-Off Ver
    Office 2010
    Posts
    2

    Delete vs Hide rows code not working

    I have the following loop/if statement

    Please Login or Register  to view this content.
    This code will successfully hide the entire row when the if statement is true. But if I put " Range(x & ":" & x).Delete " , it will not delete the row. Is there something wrong with my delete code?

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

    Re: Delete vs Hide rows code not working

    In which column are the cells to hide and delete?

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Delete vs Hide rows code not working

    Does this do what you want?

    Please Login or Register  to view this content.

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

    Re: Delete vs Hide rows code not working

    May be this one

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-22-2013
    Location
    Chicago, IL
    MS-Off Ver
    Office 2010
    Posts
    2

    Re: Delete vs Hide rows code not working

    Unfortunately it still doesn't do it.

    Basically if a certain cell contains "null" I want that whole row deleted.

    I even tried this and it didn't work.

    Please Login or Register  to view this content.

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

    Re: Delete vs Hide rows code not working

    Where is the certain cell located?

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

    Re: Delete vs Hide rows code not working

    When deleting rows, one should go from the bottom up.

    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.

+ 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