Apoyo macro sencilla

Status
Not open for further replies.

leonelcuenca

New Member
Joined
Oct 13, 2014
Messages
6
Tengo una macro que filtra por la columna trece todos las celdas que estén en blanco y las elimina, necesito que cuando en la columna trece no hayan celdas en blanco la macro se finalice es decir se deje de ejecutar

Posdata: si tu tienen alguna macro que filtre una columna según un criterio y elimine los resultados y que cuando ese criterio no se cumpla se deje de ejecutar sería perfecto que me la enviarás a ver si es mas sencilla que la que yo hice
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Sub auto_open1()
'
' auto_op Macro


Application.ScreenUpdating = False
Range("A1:P1").Select
Selection.AutoFilter
If Range("a2") = "" Then GoTo finish:
strCriterio = ""
Selection.AutoFilter Field:=13, Criteria1:=strCriterio
filaIni = ActiveSheet.UsedRange.Row + 1
filafin = ActiveSheet.UsedRange.Row + ActiveSheet.UsedRange.Rows.Count - 1
If Range("m:m") = "" Then GoTo finalizar:
strRango = CStr(filaIni) + ":" + CStr(filafin)
Rows(strRango).Select
Selection.Delete
Range("A1:P1").Select
Selection.AutoFilter
Selection.AutoFilter
finish:
Application.ScreenUpdating = True
End Sub
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,214,651
Messages
6,120,739
Members
448,989
Latest member
mariah3

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