Complicated If-Then AutoFilter for Table w/ Multiple Columns

zgadson

Board Regular
Joined
Jul 16, 2015
Messages
68
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hey guys! Have a scenario where I need to pull data from a table with multiple intersecting criteria.

My table below is basically a warehouse schedule for trucks, where the DVRSCD column gives the action for whatever happened at the date/time.
DCI = Driver Check In, CMP = Completed. So for the first line, it would mean the driver checked in to door 4 at 7:36 this morning.

That said, I am trying to create a list of ONLY active doors, which means any completed appointments would be excluded.

Take door 4 for example. It's had several drivers check in and out, so I would need to filter out all previous lines with Door 4, and exclude lines with CMP only for the most recent entry.

In short, I need a code to
(1) Finds all DSAPPT (appointment numbers) with a DOOR value that is not blank (this means the driver is checked into a dock door).
(2) Compares the DSAPPT number to the entire column and deletes the whole line for all matching DSAPPT numbers if the order is complete. (IE, Appt 598723 shows the driver checked in at 7:36AM, then the appointment was completed at 9:14AM (where another line with the matching appointment number shows CMP. Thus, both lines (DCI, and CMP) can be deleted.

This will leave me with exactly what I'm looking for - a list of drivers who have checked in, but haven't left.

Capture.PNG


Any help would be greatly appreciated!

Thank you!
 

Attachments

  • Capture.PNG
    Capture.PNG
    44.2 KB · Views: 2
  • Capture.PNG
    Capture.PNG
    31.8 KB · Views: 2
  • Capture.PNG
    Capture.PNG
    25.1 KB · Views: 2

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Can you add 1 or more helper columns to the table, put the IF/Then formula in there for all the rows, then just filter that column to generate the results you want?
 
Upvote 0
Can you add 1 or more helper columns to the table, put the IF/Then formula in there for all the rows, then just filter that column to generate the results you want?

Never even thought of that! I have several other columns I've hidden but didn't even think to use another column for that! Thanks!
 
Upvote 0

Forum statistics

Threads
1,215,575
Messages
6,125,632
Members
449,241
Latest member
NoniJ

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top