+ Reply to Thread
Results 1 to 5 of 5

Delete cell only with certain critria. Don't want to delete entire row, the celsl only

  1. #1
    Registered User
    Join Date
    04-15-2013
    Location
    Syracuse, NY
    MS-Off Ver
    Excel 2003
    Posts
    12

    Delete cell only with certain critria. Don't want to delete entire row, the celsl only

    I'm having problems trying to delete cells only. Every time I come close it deletes the entire row. In this example I labeled the cell "remove Cell". I need to remove these cells in Green and move the cells below up.


    Sub DelCellZero()
    With ActiveSheet.UsedRange
    .Replace Remove_cell, "", xlWhole
    .SpecialCells(xlCellTypeBlanks).Delete (xlShiftUp)
    End With
    End Sub
    Attached Files Attached Files

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,423

    Re: Delete cell only with certain critria. Don't want to delete entire row, the celsl only

    Did you try xlUp rather than xlShiftUp?

  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 cell only with certain critria. Don't want to delete entire row, the celsl only

    Does this do what you want?

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    04-15-2013
    Location
    Syracuse, NY
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Delete cell only with certain critria. Don't want to delete entire row, the celsl only

    This worked. Thank you very much. Bob

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

    Re: Delete cell only with certain critria. Don't want to delete entire row, the celsl only

    You're welcome. Glad to help out and thanks for the feedback.

+ 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