Filtering data with FILTER function or other.. need advice

d2the

New Member
Joined
Dec 20, 2021
Messages
1
Office Version
  1. 365
Platform
  1. MacOS
I'm not sure the "Best way" to do this.. Using data exported from a time card program.. I'm evaluating people who have had "missed punches". What I want to do is basically.. If "punch in" OR "punch out" is blank, then I want it to print the record for that day so I can see it in the table, I'm currently using =FILTER in column I to filter sections where there is a missing punch. So I'd like to do 2 things.

  • Filter out things with Missing punches BUT if that date has 2 entries I need to print both (Look at Row 9 & 10 they're both the same date because that day includes 4 punches, but one of them is missing, so because it's the same day, I want to be able to see the complete punch for that day AND the missing punch) I showed an example of what I'd like the filter to produce starting at Q2
  • When formatting columns K&L for time, it prints the blank or "0" cells as 12am is it possible to keep them blank instead of 12a
  • The way I'm seeing it going is something like an if statement. so IF Punch in OR Punch out is Blank THEN print record with Specific date for that Person
Book1
ABCDEFGHIJKLMNOPQRST
1First NameDatePunch INPunch OutPay Code HoursTotal Daily HoursFirst NameDatePunch INPunch OutPay Code HoursTotal Daily HoursMissingExample Result That I want:
2Charles13-Dec-217:53:00 AM4:10:00 PMCharles12/14/2112:00:00 AM5:45:00 PMFirst NameDatePunch INPunch Out
3Charles14-Dec-218:30:00 AM1:00:00 PMCharles12/18/214:00:00 PM12:00:00 AMCharles14-Dec-218:30:00 AM1:00:00 PM
4Charles14-Dec-215:45:00 PMCheryl12/14/218:00:00 PM12:00:00 AMCharles14-Dec-215:45:00 PM
5Charles15-Dec-219:00:00 AM1:00:00 PMCynthia12/16/2112:00:00 AM2:52:00 PMCharles18-Dec-219:00:00 AM3:30:00 PM
6Charles15-Dec-211:30:00 PM6:50:00 PMRandolph12/13/217:13:00 PM12:00:00 AMCharles18-Dec-214:00:00 PM
7Charles16-Dec-219:31:00 AM4:00:00 PMMarina12/16/218:21:00 PM12:00:00 AMCheryl14-Dec-211:03:00 PM6:40:00 PM
8Charles16-Dec-214:30:00 PM6:51:00 PMMarina12/18/2112:00:00 AM2:45:00 PMCheryl14-Dec-218:00:00 PM
9Charles18-Dec-219:00:00 AM3:30:00 PMGeoffrey12/13/218:19:00 PM12:00:00 AMCynthia16-Dec-212:52:00 PM
10Charles18-Dec-214:00:00 PMGeoffrey12/14/215:53:00 PM12:00:00 AMCynthia16-Dec-214:02:00 PM7:05:00 PM
11Cheryl12-Dec-219:06:00 AM4:25:00 PMGeoffrey12/16/218:20:00 PM12:00:00 AMRandolph13-Dec-219:26:00 AM12:55:00 PM
12Cheryl14-Dec-211:03:00 PM6:40:00 PMGeoffrey12/17/217:01:00 PM12:00:00 AMRandolph13-Dec-217:13:00 PM
13Cheryl14-Dec-218:00:00 PMBeatrice12/18/218:14:00 PM12:00:00 AMMarina16-Dec-2111:55:00 AM4:07:00 PM
14Cheryl16-Dec-2110:09:00 AM4:16:00 PMAnise12/14/215:34:00 PM12:00:00 AMMarina16-Dec-218:21:00 PM
15Cheryl17-Dec-218:19:00 AM2:34:00 PMKristina12/13/2112:00:00 AM1:37:00 PM
16Cheryl17-Dec-213:24:00 PM5:07:00 PMKristina12/16/218:08:00 PM12:00:00 AM
17Cheryl18-Dec-218:33:00 AM3:11:00 PMJenica12/16/216:13:00 PM12:00:00 AM
18Cynthia13-Dec-2111:49:00 AM4:15:00 PMJenifer12/14/219:19:00 AM12:00:00 AM
19Cynthia13-Dec-215:19:00 PM8:19:00 PMRobert12/15/211:13:00 PM12:00:00 AM
20Cynthia14-Dec-219:29:00 AM5:43:00 PMRobert12/15/216:02:00 PM12:00:00 AM
21Cynthia15-Dec-218:56:00 AM1:30:00 PMRobert12/18/215:59:00 PM12:00:00 AM
22Cynthia15-Dec-212:30:00 PM5:41:00 PMLucy12/18/215:54:00 PM12:00:00 AM
23Cynthia16-Dec-212:52:00 PMJanice12/15/218:11:00 PM12:00:00 AM
24Cynthia16-Dec-214:02:00 PM7:05:00 PMJanice12/17/218:04:00 PM12:00:00 AM
25Cynthia17-Dec-2111:49:00 AM12:12:00 PMVictoria12/18/2112:05:00 PM12:00:00 AM
26Cynthia17-Dec-211:48:00 PM1:58:00 PMAmber12/16/2110:10:00 AM12:00:00 AM
27Cynthia18-Dec-219:32:00 AM12:30:00 PMCindy12/12/217:08:00 PM12:00:00 AM
28Cynthia18-Dec-2112:30:00 PM6:10:00 PMCindy12/16/215:04:00 PM12:00:00 AM
29Randolph13-Dec-219:26:00 AM12:55:00 PMLina12/17/218:04:00 PM12:00:00 AM
30Randolph13-Dec-217:13:00 PMAysha12/17/216:59:00 PM12:00:00 AM
31Randolph14-Dec-2112:22:00 PM3:14:00 PMAysha12/18/218:24:00 PM12:00:00 AM
32Randolph14-Dec-214:42:00 PM8:17:00 PMRoy12/18/2111:52:00 AM12:00:00 AM
33Randolph15-Dec-219:56:00 AM12:34:00 PMSharniqua12/18/213:45:00 PM12:00:00 AM
34Randolph15-Dec-211:38:00 PM6:44:00 PMKristen12/14/215:32:00 PM12:00:00 AM
35Randolph17-Dec-215:02:00 PM8:23:00 PMHelene12/18/215:38:00 PM12:00:00 AM
36Randolph18-Dec-2111:57:00 AM8:15:00 PM
37Marina12-Dec-2110:49:00 AM7:07:00 PM
38Marina13-Dec-2111:37:00 AM7:37:00 PM
39Marina16-Dec-2111:55:00 AM4:07:00 PM
40Marina16-Dec-218:21:00 PM
41Marina17-Dec-219:24:00 AM1:26:00 PM
42Marina17-Dec-212:27:00 PM6:08:00 PM
43Marina18-Dec-212:45:00 PM
44Marina18-Dec-213:43:00 PM8:15:00 PM
Sheet2
Cell Formulas
RangeFormula
I2:L35I2=FILTER($A$2:$D$193,($C$2:$C$193=0)+($D$2:$D$193=0))
Dynamic array formulas.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Hi & welcome to MrExcel.
How about
Excel Formula:
=FILTER(A2:D193,(COUNTIFS(A2:A193,A2:A193,B2:B193,B2:B193,C2:C193,""))+(COUNTIFS(A2:A193,A2:A193,B2:B193,B2:B193,D2:D193,"")))
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,730
Members
448,987
Latest member
marion_davis

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