Búsqueda y copiar valores de filas

ROBERTO VALENZUELA

New Member
Joined
Jul 8, 2014
Messages
1
=IF(ISNA(VLOOKUP(B9,$F$2:$F$15720,1,FALSE)) = TRUE, " ", D9)


Buenos días, me uno a este foro porque estuve buscando solución a un problema que no logro resolver,ya busque en Internet y en este foro y no encontré algo que me pudiera ayudar por este post.


Lo que pasa es lo siguiente:


Tengo un documento en Excel algo así de unas 17 mil filas.




[TABLE="width: 500"]
<tbody>[TR]
[TD]Marca [/TD]
[TD]Tipo [/TD]
[TD]Modelo [/TD]
[TD]M[/TD]
[TD]T[/TD]
[TD]C[/TD]
[TD]Desc1[/TD]
[TD]Desc2[/TD]
[/TR]
[TR]
[TD]BMW[/TD]
[TD]Convertible 5 ptas Aut.[/TD]
[TD]2014[/TD]
[TD]33[/TD]
[TD]11[/TD]
[TD]2[/TD]
[TD]valores[/TD]
[TD]valores[/TD]
[/TR]
[TR]
[TD]BMW[/TD]
[TD]Convertible 5 ptas Std.[/TD]
[TD]2014[/TD]
[TD]22[/TD]
[TD]12[/TD]
[TD]3[/TD]
[TD]valores[/TD]
[TD]valores[/TD]
[/TR]
[TR]
[TD]BMW[/TD]
[TD]Convertible 5 ptas Aut.[/TD]
[TD]2013[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]BMW[/TD]
[TD]Convertible 4 ptas Std[/TD]
[TD]2014[/TD]
[TD]21[/TD]
[TD]22[/TD]
[TD]12[/TD]
[TD]valores[/TD]
[TD]valores[/TD]
[/TR]
</tbody>[/TABLE]








Donde los valores columna "Tipo" puede repetirse,y las repetidas deberian de tener los mismos valores en las columnas M T C Desc1 y Desc2, entonces lo que quiero hacer es que en cada celda en blanco se realice búsqueda con estos parámetros, SI el Tipo que en este caso es "Convertible Std. 5ptas" existe , copiar los valores de esa fila pero solamente los de la columnas "M T C Desc1 y Desc2" y que quede así.

[TABLE="width: 500"]
<tbody>[TR]
[TD]fila[/TD]
[TD]Marca [/TD]
[TD]Tipo [/TD]
[TD]Modelo [/TD]
[TD]M[/TD]
[TD]T[/TD]
[TD]C[/TD]
[TD]Desc1[/TD]
[TD]Desc2[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]BMW[/TD]
[TD]Convertible 5 ptas Aut.[/TD]
[TD]2014[/TD]
[TD]33[/TD]
[TD]11[/TD]
[TD]2[/TD]
[TD]valores[/TD]
[TD]valores[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]BMW[/TD]
[TD]Convertible 5 ptas Std.[/TD]
[TD]2014[/TD]
[TD]22[/TD]
[TD]12[/TD]
[TD]3[/TD]
[TD]valores[/TD]
[TD]valores[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]BMW[/TD]
[TD]Convertible 5 ptas Aut.[/TD]
[TD]2013[/TD]
[TD]33[/TD]
[TD]11[/TD]
[TD]2[/TD]
[TD]valores[/TD]
[TD]valores[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]BMW[/TD]
[TD]Convertible 4 ptas Std[/TD]
[TD]2014[/TD]
[TD]21[/TD]
[TD]22[/TD]
[TD]12[/TD]
[TD]valores[/TD]
[TD]valores[/TD]
[/TR]
</tbody>[/TABLE]





Lo intente con varias formulas y con vlookups
pero el problema es que no se como decirle que si encuentra ese valor de tipo , copie los valores de la fila que requiero requiero y las pegue en cada celda que tengo
=IF(ISNA(VLOOKUP(B9,$F$2:$F$15720,1,FALSE)) = TRUE, "No se repite ", (Decirle que copie los valores de M T C Desc1 Desc2 de la fila "X"))


Espero haberme explicado ,porque esta un poco revuelto y que me pudieran ayudar se los agradecería mucho.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
<title>Excel Jeanie HTML</title>
<!-- ######### Start Created Html Code To Copy ########## -->
Sheet4

*ABCDEFGHIJKLMNOP
Concatenate*
valores1valores**
valoresvalores**
*****valores1valores**
valoresvalores**
valoresvalores**
*******

<tbody>
[TD="bgcolor: #CACACA, align: center"]1[/TD]
[TD="align: left"]Marca[/TD]
[TD="align: left"]Tipo[/TD]
[TD="align: left"]Modelo[/TD]
[TD="align: left"]M[/TD]
[TD="align: left"]T[/TD]
[TD="align: left"]C[/TD]
[TD="align: left"]Desc1[/TD]
[TD="align: left"]Desc2[/TD]

[TD="align: left"]M1[/TD]
[TD="align: left"]T1[/TD]
[TD="align: left"]C1[/TD]
[TD="align: left"]Desc1[/TD]
[TD="align: left"]Desc2[/TD]
[TD="align: left"]mariousx@gmail.com[/TD]

[TD="bgcolor: #CACACA, align: center"]2[/TD]
[TD="align: left"]BMW[/TD]
[TD="align: left"]Convertible 5 ptas Aut.[/TD]
[TD="align: left"]2014[/TD]
[TD="align: left"]33[/TD]
[TD="align: left"]11[/TD]
[TD="align: left"]2[/TD]
[TD="align: left"]valores1[/TD]
[TD="align: left"]valores[/TD]
[TD="align: left"]BMW Convertible 5 ptas Aut.[/TD]
[TD="align: right"]33[/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]2[/TD]

[TD="bgcolor: #CACACA, align: center"]3[/TD]
[TD="align: left"]BMW[/TD]
[TD="align: left"]Convertible 5 ptas Std.[/TD]
[TD="align: left"]2014[/TD]
[TD="align: left"]22[/TD]
[TD="align: left"]12[/TD]
[TD="align: left"]3[/TD]
[TD="align: left"]valores[/TD]
[TD="align: left"]valores[/TD]
[TD="align: left"]BMW Convertible 5 ptas Std.[/TD]
[TD="align: right"]22[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]3[/TD]

[TD="bgcolor: #CACACA, align: center"]4[/TD]
[TD="align: left"]BMW[/TD]
[TD="align: left"]Convertible 5 ptas Aut.[/TD]
[TD="align: left"]2013[/TD]

[TD="align: left"]BMW Convertible 5 ptas Aut.[/TD]
[TD="align: right"]33[/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]2[/TD]

[TD="bgcolor: #CACACA, align: center"]5[/TD]
[TD="align: left"]BMW[/TD]
[TD="align: left"]Convertible 4 ptas Std[/TD]
[TD="align: left"]2014[/TD]
[TD="align: left"]21[/TD]
[TD="align: left"]22[/TD]
[TD="align: left"]12[/TD]
[TD="align: left"]valores[/TD]
[TD="align: left"]valores[/TD]
[TD="align: left"]BMW Convertible 4 ptas Std[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]22[/TD]
[TD="align: right"]12[/TD]

[TD="bgcolor: #CACACA, align: center"]6[/TD]
[TD="align: left"]BMW[/TD]
[TD="align: left"]Convertible 5 ptas Aut.[/TD]
[TD="align: left"]2014[/TD]
[TD="align: left"]33[/TD]
[TD="align: left"]11[/TD]
[TD="align: left"]2[/TD]
[TD="align: left"]valores[/TD]
[TD="align: left"]valores[/TD]
[TD="align: left"]BMW Convertible 5 ptas Aut.[/TD]
[TD="align: right"]33[/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]2[/TD]

[TD="bgcolor: #CACACA, align: center"]7[/TD]
[TD="align: left"]Seat[/TD]
[TD="align: left"]Convertible 5 ptas Aut.[/TD]
[TD="align: left"]2013[/TD]

[TD="align: left"]Seat Convertible 5 ptas Aut.[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]

</tbody>

Spreadsheet Formulas
CellFormula
I2=CONCATENATE(A2," "&B2)
J2=IFERROR(INDEX(D$2:D$7,MATCH($I2&$D2,$I$2:$I$7,0),),D2)
K2=IFERROR(INDEX(E$2:E$7,MATCH($I2&$D2,$I$2:$I$7,0),),E2)
L2=IFERROR(INDEX(F$2:F$7,MATCH($I2&$D2,$I$2:$I$7,0),),F2)
M2=IFERROR(INDEX(G$2:G$7,MATCH($I2&$D2,$I$2:$I$7,0),),G2)
N2=IFERROR(INDEX(H$2:H$7,MATCH($I2&$D2,$I$2:$I$7,0),),H2)
I3=CONCATENATE(A3," "&B3)
J3=IFERROR(INDEX(D$2:D$7,MATCH($I3&$D3,$I$2:$I$7,0),),D3)
K3=IFERROR(INDEX(E$2:E$7,MATCH($I3&$D3,$I$2:$I$7,0),),E3)
L3=IFERROR(INDEX(F$2:F$7,MATCH($I3&$D3,$I$2:$I$7,0),),F3)
M3=IFERROR(INDEX(G$2:G$7,MATCH($I3&$D3,$I$2:$I$7,0),),G3)
N3=IFERROR(INDEX(H$2:H$7,MATCH($I3&$D3,$I$2:$I$7,0),),H3)
I4=CONCATENATE(A4," "&B4)
J4=IFERROR(INDEX(D$2:D$7,MATCH($I4&$D4,$I$2:$I$7,0),),D4)
K4=IFERROR(INDEX(E$2:E$7,MATCH($I4&$D4,$I$2:$I$7,0),),E4)
L4=IFERROR(INDEX(F$2:F$7,MATCH($I4&$D4,$I$2:$I$7,0),),F4)
M4=IFERROR(INDEX(G$2:G$7,MATCH($I4&$D4,$I$2:$I$7,0),),G4)
N4=IFERROR(INDEX(H$2:H$7,MATCH($I4&$D4,$I$2:$I$7,0),),H4)
I5=CONCATENATE(A5," "&B5)
J5=IFERROR(INDEX(D$2:D$7,MATCH($I5&$D5,$I$2:$I$7,0),),D5)
K5=IFERROR(INDEX(E$2:E$7,MATCH($I5&$D5,$I$2:$I$7,0),),E5)
L5=IFERROR(INDEX(F$2:F$7,MATCH($I5&$D5,$I$2:$I$7,0),),F5)
M5=IFERROR(INDEX(G$2:G$7,MATCH($I5&$D5,$I$2:$I$7,0),),G5)
N5=IFERROR(INDEX(H$2:H$7,MATCH($I5&$D5,$I$2:$I$7,0),),H5)
I6=CONCATENATE(A6," "&B6)
J6=IFERROR(INDEX(D$2:D$7,MATCH($I6&$D6,$I$2:$I$7,0),),D6)
K6=IFERROR(INDEX(E$2:E$7,MATCH($I6&$D6,$I$2:$I$7,0),),E6)
L6=IFERROR(INDEX(F$2:F$7,MATCH($I6&$D6,$I$2:$I$7,0),),F6)
M6=IFERROR(INDEX(G$2:G$7,MATCH($I6&$D6,$I$2:$I$7,0),),G6)
N6=IFERROR(INDEX(H$2:H$7,MATCH($I6&$D6,$I$2:$I$7,0),),H6)
I7=CONCATENATE(A7," "&B7)
J7=IFERROR(INDEX(D$2:D$7,MATCH($I7&$D7,$I$2:$I$7,0),),D7)
K7=IFERROR(INDEX(E$2:E$7,MATCH($I7&$D7,$I$2:$I$7,0),),E7)
L7=IFERROR(INDEX(F$2:F$7,MATCH($I7&$D7,$I$2:$I$7,0),),F7)
M7=IFERROR(INDEX(G$2:G$7,MATCH($I7&$D7,$I$2:$I$7,0),),G7)
N7=IFERROR(INDEX(H$2:H$7,MATCH($I7&$D7,$I$2:$I$7,0),),H7)

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
 
<!-- ######### End Created Html Code To Copy ########## -->
Roberto entiendo tras leer tu pregunta q todos los coches del mismo “tipo” tienen los mismos valores para las columnas M, T, C Desc1 y Desc2 para los casos en que estos campos “celdas” estén vacios. Es esto correcto? Porque en la columna A aparece el campo “Marca” y me parece lógico pensar que esto ocurre para coches de las misma mara y “AND“ del mimo tipo.
Ajusta los rangos de tu data set adecuadamente y ten cuidado con los signos $
Pega esta formula en J2 =IFERROR(INDEX(D$2:D$7,MATCH($I2&$D2,$I$2:$I$7,0),),D2)
pulsa F5 y seleciona el rango J2:N15720 pulsa enter y mueve el ratón a la barra de formulas. Ahora pulsa CTRL + letra de dirección abajo “ Arrow down” y enter para propagar la formula a todo tu data set.

Como ves la información que querías se a creado en las columnas de ayuda J:N. Si quieres puedes usar copiar y pegar especial solo valores para sustituir los valores de las formas iniciales
Notas. Usa una copia para no perder tus datos y valida el data set para comprobar que la información es correcta





 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

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