- Codice: Seleziona tutto
Sub CANCELLARIGHE()
Dim rng As Range
Dim i As Long
Set rng = ActiveSheet.UsedRange
For i = rng.Rows.Count To 2 Step -1
If Application.CountA(rng.Rows(i)) = 0 Then
rng.Rows(i).Delete
End If
Next i
End Sub
Moderatori: Anthony47, Flash30005
Sub CANCELLARIGHE()
Dim rng As Range
Dim i As Long
Set rng = ActiveSheet.UsedRange
For i = rng.Rows.Count To 2 Step -1
If Application.CountA(rng.Rows(i)) = 0 Then
rng.Rows(i).Delete
End If
Next i
End Sub
Sub CANCELLARIGHE()
Dim rng As Range
Dim i As Long
Set rng = Range("A5:F32")
For i = rng.Rows.Count To 5 Step -1 ''''mi sembra sia sino riga 5
If Application.CountA(Range("A" & i & ":F" & i)) = 0 Then Rows(i & ":" & i).Delete
Next i
set rng = Nothing
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A5:F32")) Is Nothing Then
Dim rg As Long
rg = Target.Row
If Target.Value = "" Then
If Application.CountA(Range("A" & rg & ":F" & rg)) = 0 Then
Application.EnableEvents = False
Rows(rg & ":" & rg).Delete
Application.EnableEvents = True
End If
End If
End If
End Sub
Public Sub CancellaRigheVuote()
Dim SourceRange As Range
Dim EntireRow As Range
On Error Resume Next
Set SourceRange = Application.InputBox( _
"Scegli l'area:", "Cancella Righe Vuote", _
Application.Selection.Address, Type:=8)
If Not (SourceRange Is Nothing) Then
Application.ScreenUpdating = False
For I = SourceRange.Rows.Count To 1 Step -1
Set EntireRow = SourceRange.Cells(I, 1).EntireRow
If Application.WorksheetFunction.CountA(EntireRow) = 0 Then
EntireRow.Delete
End If
Next
Application.ScreenUpdating = True
End If
End Sub
Torna a Applicazioni Office Windows
Aggiungere e eliminare righe senza alterare i riferimenti de Autore: trittico69 |
Forum: Applicazioni Office Windows Risposte: 3 |
Velocizzare ordinamento di tante righe con valori e formule Autore: ricky53 |
Forum: Applicazioni Office Windows Risposte: 2 |
cerca il più grande numero di celle vuote in un intervallo Autore: papiriof |
Forum: Applicazioni Office Windows Risposte: 2 |
Cartella che non si cancella perché non esiste Autore: aurelio37 |
Forum: Sistemi Operativi Windows Risposte: 23 |
Visitano il forum: Nessuno e 20 ospiti