+ Reply to Thread
Results 1 to 6 of 6

Identify Cells with value of 0 and delete 0 cell and adjacent cell

  1. #1
    Registered User
    Join Date
    02-20-2013
    Location
    Indianapolis, Indiana
    MS-Off Ver
    Excel 2007
    Posts
    28

    Identify Cells with value of 0 and delete 0 cell and adjacent cell

    Hello,

    I am having trouble writing a macro that both identifies cells with a value of 0 within a range and then deletng that cell and the cell to the immediate left. Ideally this macro would clear both cells and move the rest of the data up one row.

    Thank you!

    Sam

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Identify Cells with value of 0 and delete 0 cell and adjacent cell

    Hi Sam.

    You need a select special Macro.

    I think that you want just those two cells deleted not the entire row.

    BRB

  3. #3
    Registered User
    Join Date
    02-20-2013
    Location
    Indianapolis, Indiana
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Identify Cells with value of 0 and delete 0 cell and adjacent cell

    Correct, I only want those two cells deleted so that the cells below them will move up. I need the data to be without blanks so that I can bring it over to another worksheet without causing system issues after the workbook is finalized.

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Identify Cells with value of 0 and delete 0 cell and adjacent cell

    Here is your code.

    Enjoy.



    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Identify Cells with value of 0 and delete 0 cell and adjacent cell

    The line
    Please Login or Register  to view this content.
    Is where you select your range, modify that to suit your requirement.

  6. #6
    Registered User
    Join Date
    02-20-2013
    Location
    Indianapolis, Indiana
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Identify Cells with value of 0 and delete 0 cell and adjacent cell

    Thank you mehmetcik!

+ 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