Excel - ELIMINAR FILAS EN EXCEL !!!!

 
Vista:
sin imagen de perfil
Val: 46
Ha disminuido su posición en 11 puestos en Excel (en relación al último mes)
Gráfica de Excel

ELIMINAR FILAS EN EXCEL !!!!

Publicado por Giancarlo Jose (67 intervenciones) el 28/04/2016 22:03:23
HOLA A TODOS !!!

QUIERO ELIMINAR LAS FILAS EN BLANCO PERO NO ME SALE AL 100%

TENGO EL SIGUIENTE CÓDIGO QUE POR EJEMPLO TENGO VACÍAS LA FILA 20 a la 25 ME LAS BORRA TODAS PERO MENOS LA 20 POR QUE ??? AYUDEN O SI TIENEN OTRO CÓDIGO PARA ELIMINAR FILAS EN BLANCO POR FAVOR !!!

1
2
3
4
5
6
7
8
9
10
11
12
Sub suprimir()
'Determinar la cantidad de elementos a procesar
ult = Cells(Rows.Count, 1).End(xlUp).Row
'recorrer todos los elementos
For x = ult To 1 Step -1
'condicion a evaluar
If Application.CountA(Rows(x)) = 0 Then
'Accion a realizar
Rows(x).Delete
End If
Next
End Sub
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
sin imagen de perfil

ELIMINAR FILAS EN EXCEL !!!!

Publicado por agustin (149 intervenciones) el 29/04/2016 17:27:32
Prueba asi:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Sub suprimir()
   Dim x, ult As Integer
   'Determinar la cantidad de elementos a procesar
   ult = Cells(Rows.Count, 1).End(xlUp).Row
   'recorrer todos los elementos
   x = 1
   Do While  x <= ult
      'condicion a evaluar
      If Application.CountA(Rows(x)) = 0 Then
         'Accion a realizar
         Rows(x).Delete
         ult = ult - 1
      Else
         x = x + 1
      End If
   Loop
End Sub
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
1
Comentar