View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Using Time Criteria

You should be able to do this with Data=Filter=Autofilter, then select
your criteria.

However, it seems like everyone would have come in after midnight and left
before midnight. I assume the date of the coming and going would be a
consideration. You might need to add a column with a formula to flag your
records, then set the filter value on that column.

In any event, once you have filtered the data, you can select all the data
and copy it. Only the visible rows will be pasted.

Once you have it all set up, turn on the macro recorder and repeat the
actions manually. then turn off the recorder. This will give you the basic
code you need to do this.

Another option is to look at using the Advanced filter which can copy the
filtered data to another location. (and you wouldn't need a macro)

--
Regards,
Tom Ogilvy

"KPM" wrote in message
...
I have the following worksheet and would like to have a current population

count as well as extrapulate information to a worksheet with only the active
population shown with all the information for each name.

Name Sex DOB Date In Time In Date Out Time Out

The current population would be between 12:00 AM Time In and 12:00 AM Time

Out

12:00 AM and <12:00 AM for Time Out


The first worksheet would be a history worksheet and the second would be

current only
Thanks for any suggestions.