+ Reply to Thread
Results 1 to 3 of 3

Macro to delete entire row on a condition

  1. #1
    Registered User
    Join Date
    06-23-2010
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    7

    Macro to delete entire row on a condition

    Hello,

    I have data of the time in/time out of different individuals taken from another program . I don't know how to make a macro to delete entire row if that particular person timed in/timed out the second time. I'm new to macro and know only copy paste and offsets a little. I attached a sample file.

    Thanks.
    Attached Files Attached Files
    Last edited by kgonzalbo; 05-30-2011 at 12:40 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro to delete entire row on a condition

    You can actually do this by hand pretty quickly using an a couple of formulas in empty columns and an AUTOFILTER. Look at Sheet2 and you'll see the formula, use the filter to filter for FALSE in the last column and you'll see the AutoFilter doing its job... you just delete all the rows left visible.

    This macro actually uses the formulas as shown on sheet2. It inserts the formulas, applies the autofilter, deletes the visible rows, then removes the extra stuff again.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    06-23-2010
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Macro to delete entire row on a condition

    Quote Originally Posted by JBeaucaire View Post
    You can actually do this by hand pretty quickly using an a couple of formulas in empty columns and an AUTOFILTER. Look at Sheet2 and you'll see the formula, use the filter to filter for FALSE in the last column and you'll see the AutoFilter doing its job... you just delete all the rows left visible.

    This macro actually uses the formulas as shown on sheet2. It inserts the formulas, applies the autofilter, deletes the visible rows, then removes the extra stuff again.

    Please Login or Register  to view this content.

    Thanks again! The macro and formula really helps, saved me time.

    The formula I understand but the macro is way too deep for me, need to study it.

+ 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