Buscar y Ocultar

VeryGreenGrinch

New Member
Joined
May 8, 2009
Messages
6
¡Hola!... y de antemano gracias.

Intenté realizar la macro a través de "Grabar Macro" (o "Macro Recorder"), pero algunas acciones no las escribe. Y el asunto es así:

A través de un botón simple, al pulsarlo, necesito que busque por columnas en toda la hoja, las celdas que contengan la palabra "automóvil" (por ejemplo... y siempre será la misma)... y que oculte la fila que lo contenga.

Saludos!.......................... Y por siempre gracias por compartir su conocimiento.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
algo así podría funcionarte:

Code:
Do Until Cells.Find("Automovil") Is Nothing
    Cells.Find("Automovil").EntireRow.Hidden = True
Loop
 
Upvote 0
Note que si sus datos son continguos y que el texto que se busca se encuentra en solamente una columna, se puede usar filtro (AutoFilter en XL2003 y abajo). Y allí sí uno podría grabar un macro. Por ejemplo (grabado usando 2007):
Code:
    ActiveSheet.Range("$A$1:$A$5").AutoFilter Field:=1, Criteria1:="<>*car*", _
        Operator:=xlAnd
 
Upvote 0
Para el supuesto de que la palabra Automóvil pudiera aparecer en cualquier columna y tengamos encabezados en la tabla, podemos correr una macro de AdvancedFilter, con criterio en dos celdas; la de arriba vacia y la de abajo con la sigiente formula:
si la tabla c/encabezamientos estuviera en A1:M100
=contar.si(A2:M2;"*Autom?vil*")>0

desde ya que el codigo es muy facil.....
 
Upvote 0

Forum statistics

Threads
1,222,827
Messages
6,168,480
Members
452,192
Latest member
FengXue

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