Excel - how to hide certain unwanted times?

Closed
rul_C - Aug 23, 2009 at 02:45 AM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Aug 25, 2009 at 09:50 PM
Hello,

As you can see below information (extracted from Excel Sheet), my company works 24 hrs, and each time my staff tag on the main door, the log will capture the record. We work from 7 am to 7 pm and vice versa.

DATE TIME NAME

20090101 12:06 AM wwwwwwww
20090101 12:13 AM eeeeeeeeeee
20090101 12:15 AM ttttttttttttttttttt
20090101 12:18 AM fffffffffffffffffffff
20090101 12:20 AM bbbbbbbbbbbbb
20090102 6:12 AM vvvvvvvvvvvvvvv
20090102 6:22 AM bbbbbbbbbbbbbbbb
20090102 6:28 AM ccccccccccccccccl
20090102 6:29 AM zzzzzzzzzzzzzzz
20090102 7:02 PM gggggggggggggg
20090102 7:03 PM kkkkkkkkkkkkkk
20090102 7:05 PM hhhhhhhhhhhhhh
20090102 7:11 PM jjjjjjjjjjjjjjjjjjj
20090102 7:16 PM kkkkkkkkkkkkk
20090102 7:18 PM llllllllllllllllllllll

I need to only view details from certain time range, to check my staffs punctuality to work - EXP: I need data from 6 am to 8 am and also from 6pm to 8pm.

The rest of the data (8am to 6pm and 8pm to 6am) need to be hidden. Can u help me to see this data in Excel sheet using Macro, VBA or filter :S. Please.....

1 response

venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Aug 25, 2009 at 09:50 PM
use advance filer
your data is from A1 to H16 with row 1 containing column headings date, time, data

now in G1 to H3 type this
time time
>=6:00 am <=8:00 am
>=6:00 pm <=8:00 pm
(remember G1 will have "time" and also H1 will have "time"

1. now click data(menu)-filter-advancefilter
2. in the top under "action"
3. . choose "FILTER THE LIST IN THE PLACE"
4. against list range type
$A$1:$C$16
(or you can click the icon at the right end and move the mouse from A1 to the end of the data" automatically the above will be entered)
5. against "criteria range" type
$G$1:$H$3
(or you can try the same trick as above)

6. click ok.

see what happens

to remove ADVANCEFILTER
click data-filter -showall
the data is restored ( this is in version ecel 2002)

any doubt post back
1