Extraer datos según 2 criterios
Tengo una hoja de excel que es para control de asistencia, como me pueden ayudar para que busque según la fecha, la hora de entrada de acuerdo a otro campo de tiene marcada la E de entrada o la S de salida por ejemplo:
Fecha Hora Tipo
02/05/2014 7:52:30 E
02/05/2014 12:11:18 S
02/05/2014 16:50:02 S
05/05/2014 7:48:37 E
05/05/2014 12:02:34 S
05/05/2014 12:34:35 E
etc...
1 Respuesta
Ejemplo:
A B C D
1 Fecha Hora Tipo
2 02/05/2014 7:52:30 E
3 02/05/2014 12:11:18 S
4 02/05/2014 12:40:00 E
5 02/05/2014 16:50:02 S
6 05/05/2014 7:48:37 E
7 05/05/2014 12:02:34 S
8 05/05/2014 12:34:35 E
Estos datos los descargo de un reloj biométrico en archivo plano, lo que se desea es:
D=02/05/2014(Criterio de Búsqueda)
E= Hora(7:52:30) siempre que sea (E=entrada)
F= Hora(12:11:18) siempre que sea (S=salida)
G= Hora(12:40:00) siempre que sea (E=entrada)
H= Hora(16:50:02) siempre que sea (S=salida)
En el siguiente enlace te dejo un fichero con la solución
Recuerda que la fórmula que he utilizado es matricial, es decir, para poder aceptarla hay que pulsar CONTROL + SHIFT + ENTER
http://share.myflare.com/5jdVcV
No olvides finalizar la consulta
[/color]</td><td style="border-left: 3px solid #000000;" align="CENTER" valign="BOTTOM" bgcolor="#00B0F0">[color=#000000]FECHA A ENCONTRAR[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]HORA (E)
ENCONTRADA[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]HORA (S)
ENCONTRADA[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]HORA (E)
ENCONTRADA[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]HORA (S)
ENCONTRADA[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td></tr><tr><td style="border: 3px solid #000000;" align="RIGHT" valign="BOTTOM" height="20">[color=#000000]02/05/2014[/color]</td><td style="border: 3px solid #000000;" align="RIGHT" valign="BOTTOM">[color=#000000]8:16:44 AM[/color]</td><td style="border: 3px solid #000000;" align="LEFT" valign="BOTTOM">[color=#000000]E[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td align="RIGHT" valign="BOTTOM">[color=#000000]02/05/2014[/color]</td><td style="border: 3px solid #000000;" align="RIGHT" valign="BOTTOM">[color=#000000]8:16:44 AM[/color]</td><td style="border: 3px solid #000000;" align="RIGHT" valign="BOTTOM">[color=#000000]12:54:25 PM[/color]</td><td style="border: 3px solid #000000;" align="RIGHT" valign="BOTTOM">[color=#000000]1:08:27 PM[/color]</td><td style="border: 3px solid #000000;" align="RIGHT" valign="BOTTOM">[color=#000000]5:53:10 PM[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td></tr><tr><td style="border: 3px solid #000000;" align="RIGHT" valign="BOTTOM" height="20">[color=#000000]02/05/2014[/color]</td><td style="border: 3px solid #000000;" align="RIGHT" valign="BOTTOM">[color=#000000]12:54:25 PM[/color]</td><td style="border: 3px solid #000000;" align="LEFT" valign="BOTTOM">[color=#000000]S[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td></tr><tr><td style="border: 3px solid #000000;" align="RIGHT" valign="BOTTOM" height="20">[color=#000000]02/05/2014[/color]</td><td style="border: 3px solid #000000;" align="RIGHT" valign="BOTTOM">[color=#000000]5:53:10 PM[/color]</td><td style="border: 3px solid #000000;" align="LEFT" valign="BOTTOM">[color=#000000]S[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td style="border: 3px solid #000000;" align="RIGHT" valign="BOTTOM" bgcolor="#FFFF00">[color=#000000]02/05/2014[/color]</td><td style="border: 3px solid #000000;" align="RIGHT" valign="BOTTOM" bgcolor="#92D050">[color=#000000]#NOMBRE?[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]Esto es lo que se desea, si puedes ayudarme, gracias…[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td></tr><tr><td style="border: 3px solid #000000;" align="RIGHT" valign="BOTTOM" height="20">[color=#000000]02/05/2014[/color]</td><td style="border: 3px solid #000000;" align="RIGHT" valign="BOTTOM">[color=#000000]1:08:27 PM[/color]</td><td style="border: 3px solid #000000;" align="LEFT" valign="BOTTOM">[color=#000000]E[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td style="border: 3px solid #000000;" align="RIGHT" valign="BOTTOM" bgcolor="#92D050">[color=#000000]#NOMBRE?[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td></tr><tr><td style="border: 3px solid #000000;" align="RIGHT" valign="BOTTOM" height="20">[color=#000000]02/05/2014[/color]</td><td style="border: 3px solid #000000;" align="RIGHT" valign="BOTTOM">[color=#000000]1:09:27 PM[/color]</td><td style="border: 3px solid #000000;" align="LEFT" valign="BOTTOM">[color=#000000]E[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td style="border: 3px solid #000000;" align="RIGHT" valign="BOTTOM" bgcolor="#92D050">[color=#000000]#NOMBRE?[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td></tr><tr><td style="border: 3px solid #000000;" align="RIGHT" valign="BOTTOM" height="20">[color=#000000]05/05/2014[/color]</td><td style="border: 3px solid #000000;" align="RIGHT" valign="BOTTOM">[color=#000000]12:11:56 AM[/color]</td><td style="border: 3px solid #000000;" align="LEFT" valign="BOTTOM">[color=#000000]E[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td style="border: 3px solid #000000;" align="RIGHT" valign="BOTTOM" bgcolor="#92D050">[color=#000000]#VALOR![/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]
[/color]</td><td align="LEFT" valign="BOTTOM">[color=#000000]Favor ayudar
[/color]</td></tr></tbody></table>
A B C
1 FECHA HORA TIPO
2 02/05/2014 8:16:44 AM E
3 02/05/2014 12:54:25 PM S
4 02/05/2014 5:53:10 PM S
5 02/05/2014 1:08:27 PM E
6 02/05/2014 1:09:27 PM E
7 05/05/2014 12:11:56 AM E
A B
10 FECHA A ENCONTRAR 02/05/2014
11 HORA (E) ENCONTRADA 8:16:44 AM
12 HORA (S) ENCONTRADA 12:54:25 PM
13 HORA (E) ENCONTRADA 1:08:27 PM
14 HORA (S) ENCONTRADA 5:53:10 PM
existen 2 registros de (E) 1:08:27 y 1:09:27 para 02/05/2014 de debe tomar en cuenta siempre la primera.
Es verdad se debe tomar la primera hora de E antes de la primera hora de S y luego la segunda hora de E antes de la segunda salida, o sea si hay:
1.......
02/05/2014 8:16:44 AM E
02/05/2014 8:17:44 AM E
02/05/2014 12:54:25 PM S
Para este caso se debe tomar la primera E = 8:16:44 AM
2....
02/05/2014 5:53:10 PM S
02/05/2014 1:08:27 PM E
02/05/2014 1:09:27 PM E
Para este caso se debe tomar la primera E = 1:08:27 PM
- Compartir respuesta