borrado de filas con codigo

rubito1

New Member
Joined
Jan 11, 2014
Messages
1
en el archivo,en la hoja planilla, ya hay un codigo que "al borrar en la hoja carga diaria"hace que se borren aca(en planilla)los adtos "manuales;
el codigo parece andar bien pero tiene 2 problemas
1)como podras ver en el codigo,le puse hasta la fila 300 solamente(yo quiero ponerle mas,hasta la fila 1000 de ser posible)pero sucede que pasando los 300, empieza a tardar un monton de tiempo,no se si se puede mejorar eso,haciendo que,si apartir de una celda a no hay datos entonces que pare el calculo...?

2)quiero que se "reordene" la "carga diaria"hacia arriba,ocupando los espacios vacios;no que se "eliminen"filas
el tema es que al reordenarse aca,en la hoja "carga diaria"no me coincidiran los datos que se cargan en la "planilla" con los datos "manuales"
3)se me ocurre algo asi como que en la "carga diaria" los datos se "copien y peguen "ocupando los espacios vacios y luego se "borren"esos datos copiados;se entiende?
Option Explicit

Private Sub Worksheet_Calculate()
Dim i As Long
Dim j As Long
On Error Resume Next
Application.EnableEvents = False
For i = 5 To 300
j = WorksheetFunction.CountBlank(Range("A" & i & ":L" & i))
If j = 12 Then Range("M" & i & ":T" & i).ClearContents
j = 0
Next i
Application.EnableEvents = True
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.MoveAfterReturn = False
If Target.Count = 1 Then
If Not Intersect(Target, Range("M5:M1000")) Is Nothing Then
Cells(Target.Row, "N") = Now
End If
End If
Application.MoveAfterReturn = True
End Sub



 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

Forum statistics

Threads
1,223,948
Messages
6,175,568
Members
452,652
Latest member
eduedu

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