View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
puiuluipui puiuluipui is offline
external usenet poster
 
Posts: 468
Default Delete Row with condition

Hi, i need to delete some rows, but based on three conditions. I need the
macro to take a look at date, than at name and then at time, and to keep in
every day only the smallest time. If there are duplicates of names in one day
(01.06.2009) the code to look at the time and keep the smallest time. Then,
to look in 02.06.2009 and if a name appear over 2 times (a name can appear
more than two times), then to look at time and keep the smallest time. Then
to look at 03.06.2009.......etc

Database Ex:
A B C D
date time station name
01.06.2009 08:00:05 in John
01.06.2009 07:58:21 in Mary
01.06.2009 08:01:01 in Jim
01.06.2009 08:04:01 in John
01.06.2009 11:17:05 in Jim
01.06.2009 08:23:23 in Mary
01.06.2009 10:09:57 in Mary
02.06.2009 08:02:10 in John
02.06.2009 07:58:11 in Mary
02.06.2009 08:11:58 in Jim
02.06.2009 08:24:19 in John
02.06.2009 11:09:45 in Jim
02.06.2009 08:01:36 in Mary
02.06.2009 10:00:45 in Mary

Result Ex:
01.06.2009 08:00:05 in John
01.06.2009 07:58:21 in Mary
01.06.2009 08:01:01 in Jim
02.06.2009 08:02:10 in John
02.06.2009 07:58:11 in Mary
02.06.2009 08:11:58 in Jim

Can this be done?
Thanks!