+ Reply to Thread
Results 1 to 5 of 5

How to delete rows based on inputs from 2 columns?

  1. #1
    Registered User
    Join Date
    07-02-2013
    Location
    Ramstein, Germany
    MS-Off Ver
    Excel 2007
    Posts
    3

    How to delete rows based on inputs from 2 columns?

    I am trying to delete rows that have Observation or Fail containted in column B and any row with the Emp in column C that had an Observation or Fail in column B.

    Example:

    B C
    Pass 1111
    Fail 1111
    Observation 2222
    Pass 3333
    Observation 3333
    Pass 3333
    Pass 4444
    Pass 4444
    Fail 3333
    Pass 5555

    The result would have just the rows left with Emp 4444 and 5555 left on the sheet.

    Thanks for your time.
    Attached Files Attached Files

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: How to delete rows based on inputs from 2 columns?

    Hi Woody. Why are Pass 1111 and Pass 3333 deleted? I'm a little confused.

  3. #3
    Registered User
    Join Date
    07-02-2013
    Location
    Ramstein, Germany
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: How to delete rows based on inputs from 2 columns?

    We are do an honor roll for our workers and our QC does about 250 inspections a month. We have to narrow down our employees to only those with passes for the quarterly award. So any with fails/observations have to be weeded out.

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: How to delete rows based on inputs from 2 columns?

    I understand that. However, in the example from your first post you say that
    just the rows left with Emp 4444 and 5555 left on the sheet
    Emp 4444 and 5555 have a "pass" so they should not be deleted. Why are Pass 1111 and Pass 3333 deleted. They also have a "pass". Should they not also be included?

  5. #5
    Registered User
    Join Date
    07-02-2013
    Location
    Ramstein, Germany
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: How to delete rows based on inputs from 2 columns?

    Emp 1111 and 3333 do have passes but because they have fails/observations they are not eligible for an award. So I am trying to write a code to delete those Emp numbers that have a fail or observation and a pass. I know how to write in VBA and just take out the fails and observations but it doesn't eliminate the Emp number. So in the end I still have to manually look through the Emp numbers to see if those with passes have a fail/observation that would disqualify them for an award. I hope this explains it better.

+ 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