I need to write a program to use our time card data to determine who is at work when the file is opened. I have all the data pulling into excel and sorted from newest to oldest. The following is what I would like to do...

  1. pull in the name in the "first name" column and "last name" column
  2. if that name has an "out" in the "in/out" column then delete all instances of the name
  3. if that name has an "in" in the "in/out" column then leave that name and delete all following instances of the name
  4. move to the next name and repeat steps 1, 2, and 3 until done
  5. sort by department
  6. done

I'm having a hard time figuring out a general overview of the functions that will help do this and would like some ideas on how you would begin with this task.

Thanks in advance