+ Reply to Thread
Results 1 to 5 of 5

excel 2010--need formula for deleting row if a specific cell in that row = 0

  1. #1
    Registered User
    Join Date
    08-23-2009
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    10

    excel 2010--need formula for deleting row if a specific cell in that row = 0

    I have a worksheet that uses columns a,b,c,d and e. (Range is a3:e4169)

    If cell e3 = 0, then delete a3 through e3.
    If cell e4 = 0, then delete a4 through e4..........and so on

    I am not very good with Macro's, but will create one if need be.
    However, if there is a conditional formatting that I could use, I would prefer to use that.

    How do I go about creating a formula that will do the above?

    Thank you very much for your help!

    Guyel

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: excel 2010--need formula for deleting row if a specific cell in that row = 0

    Try this code
    Please Login or Register  to view this content.
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    To run the Excel VBA code:
    Choose View | Macros
    Select a macro in the list, and click the Run button.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    08-23-2009
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: excel 2010--need formula for deleting row if a specific cell in that row = 0

    Ahhh, that is sweet!

    Thanks for your help!!!

  4. #4
    Registered User
    Join Date
    07-21-2013
    Location
    North Carolina, USA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: excel 2010--need formula for deleting row if a specific cell in that row = 0

    I have a similar issue where I need to delete the entire row if the value in column A = Dead End. I have tried using this macro but I am not very good with macros either.
    If possble can you show me how the macro should look?

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: excel 2010--need formula for deleting row if a specific cell in that row = 0

    Try this
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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