VBA to call first and last clock in only and delete the rest

04011988

New Member
Joined
Sep 23, 2018
Messages
26
Hi,

I have another question here that hope you can assist me.

I have an extract of raw data from our bundy clock containing the clock in and out of employees per day. However, I am not sure how to put it in VBA - as I only need to capture the first and latest time (e.g for Name A - 6:21 and 12:39 only). Then after filtering those, I need to filter it by Name to all dates too as I need to send that to all employees for confirmation. Hope you can help me. Thanks in advance.

[TABLE="width: 674"]
<colgroup><col span="2"><col><col span="2"><col><col><col span="2"></colgroup><tbody>[TR]
[TD]Dept[/TD]
[TD]User ID[/TD]
[TD]Name[/TD]
[TD]Enroll ID[/TD]
[TD]Device ID[/TD]
[TD]Place[/TD]
[TD]Date[/TD]
[TD]Time[/TD]
[TD]Att Type[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]_f_00013[/TD]
[TD]A[/TD]
[TD]13[/TD]
[TD]2[/TD]
[TD]Entrance Door[/TD]
[TD]2018-09-14[/TD]
[TD]06:21
[/TD]
[TD]Clock-in[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]_f_00013[/TD]
[TD]A[/TD]
[TD]13[/TD]
[TD]1[/TD]
[TD]HR Dept.[/TD]
[TD]2018-09-14[/TD]
[TD]09:49
[/TD]
[TD]Out[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]_f_00013[/TD]
[TD]A[/TD]
[TD]13[/TD]
[TD]1[/TD]
[TD]HR Dept.[/TD]
[TD]2018-09-14[/TD]
[TD]09:51
[/TD]
[TD]Out[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]_f_00013[/TD]
[TD]A[/TD]
[TD]13[/TD]
[TD]1[/TD]
[TD]HR Dept.[/TD]
[TD]2018-09-14[/TD]
[TD]12:16
[/TD]
[TD]Out[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]_f_00013[/TD]
[TD]A[/TD]
[TD]13[/TD]
[TD]2[/TD]
[TD]Entrance Door[/TD]
[TD]2018-09-14[/TD]
[TD]12:39
[/TD]
[TD]Clock-in[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]_f_00016[/TD]
[TD]B[/TD]
[TD]16[/TD]
[TD]2[/TD]
[TD]Entrance Door[/TD]
[TD]2018-09-14[/TD]
[TD]07:35[/TD]
[TD]Clock-in[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]_f_00016[/TD]
[TD]B[/TD]
[TD]16[/TD]
[TD]2[/TD]
[TD]Entrance Door[/TD]
[TD]2018-09-14[/TD]
[TD]08:30[/TD]
[TD]Clock-in[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]_f_00016[/TD]
[TD]B[/TD]
[TD]16[/TD]
[TD]2[/TD]
[TD]Entrance Door[/TD]
[TD]2018-09-14[/TD]
[TD]09:46[/TD]
[TD]Clock-in[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]_f_00016[/TD]
[TD]B[/TD]
[TD]16[/TD]
[TD]1[/TD]
[TD]HR Dept.[/TD]
[TD]2018-09-14[/TD]
[TD]10:21[/TD]
[TD]Out[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]_f_00016[/TD]
[TD]B[/TD]
[TD]16[/TD]
[TD]2[/TD]
[TD]Entrance Door[/TD]
[TD]2018-09-14[/TD]
[TD]12:03[/TD]
[TD]Clock-in[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]_f_00016[/TD]
[TD]B[/TD]
[TD]16[/TD]
[TD]1[/TD]
[TD]HR Dept.[/TD]
[TD]2018-09-14[/TD]
[TD]13:22[/TD]
[TD]Out[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]_f_00031[/TD]
[TD]C[/TD]
[TD]31[/TD]
[TD]2[/TD]
[TD]Entrance Door[/TD]
[TD]2018-09-14[/TD]
[TD]06:16[/TD]
[TD]Clock-in[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]_f_00031[/TD]
[TD]C[/TD]
[TD]31[/TD]
[TD]2[/TD]
[TD]Entrance Door[/TD]
[TD]2018-09-14[/TD]
[TD]06:16[/TD]
[TD]Clock-in[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]_f_00032[/TD]
[TD]D[/TD]
[TD]32[/TD]
[TD]2[/TD]
[TD]Entrance Door[/TD]
[TD]2018-09-14[/TD]
[TD]02:38[/TD]
[TD]Clock-in[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]_f_00032[/TD]
[TD]D[/TD]
[TD]32[/TD]
[TD]1[/TD]
[TD]HR Dept.[/TD]
[TD]2018-09-14[/TD]
[TD]06:23[/TD]
[TD]Out[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]_f_01013[/TD]
[TD]E[/TD]
[TD]1013[/TD]
[TD]2[/TD]
[TD]Entrance Door[/TD]
[TD]2018-09-14[/TD]
[TD]05:45[/TD]
[TD]Clock-in[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]_f_01013[/TD]
[TD]E[/TD]
[TD]1013[/TD]
[TD]1[/TD]
[TD]HR Dept.[/TD]
[TD]2018-09-14[/TD]
[TD]07:58[/TD]
[TD]Out[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]_f_01013[/TD]
[TD]E[/TD]
[TD]1013[/TD]
[TD]2[/TD]
[TD]Entrance Door[/TD]
[TD]2018-09-14[/TD]
[TD]08:00[/TD]
[TD]Clock-in[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]_f_01013[/TD]
[TD]E[/TD]
[TD]1013[/TD]
[TD]1[/TD]
[TD]HR Dept.[/TD]
[TD]2018-09-14[/TD]
[TD]08:50[/TD]
[TD]Out[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]_f_01013[/TD]
[TD]E[/TD]
[TD]1013[/TD]
[TD]2[/TD]
[TD]Entrance Door[/TD]
[TD]2018-09-14[/TD]
[TD]08:53[/TD]
[TD]Clock-in[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]_f_01013[/TD]
[TD]E[/TD]
[TD]1013[/TD]
[TD]1[/TD]
[TD]HR Dept.[/TD]
[TD]2018-09-14[/TD]
[TD]09:42[/TD]
[TD]Out[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]_f_01013[/TD]
[TD]E[/TD]
[TD]1013[/TD]
[TD]2[/TD]
[TD]Entrance Door[/TD]
[TD]2018-09-14[/TD]
[TD]09:45[/TD]
[TD]Clock-in[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]_f_01013[/TD]
[TD]E[/TD]
[TD]1013[/TD]
[TD]2[/TD]
[TD]Entrance Door[/TD]
[TD]2018-09-14[/TD]
[TD]10:21[/TD]
[TD]Clock-in[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]_f_01013[/TD]
[TD]E[/TD]
[TD]1013[/TD]
[TD]1[/TD]
[TD]HR Dept.[/TD]
[TD]2018-09-14[/TD]
[TD]12:17[/TD]
[TD]Out[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]_f_01013[/TD]
[TD]E[/TD]
[TD]1013[/TD]
[TD]2[/TD]
[TD]Entrance Door[/TD]
[TD]2018-09-14[/TD]
[TD]12:19[/TD]
[TD]Clock-in[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]_f_01013[/TD]
[TD]E[/TD]
[TD]1013[/TD]
[TD]1[/TD]
[TD]HR Dept.[/TD]
[TD]2018-09-14[/TD]
[TD]13:38[/TD]
[TD]Out[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]_f_01013[/TD]
[TD]E[/TD]
[TD]1013[/TD]
[TD]2[/TD]
[TD]Entrance Door[/TD]
[TD]2018-09-14[/TD]
[TD]13:40[/TD]
[TD]Clock-in
[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
sorry been sick and just check your response now. and thank you so much.

I will try to follow it. is it possible to do it in VBA also?

Hi, Tried the formula but it is not working.

Hope you could please help me further. Thanks
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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