ich weiß, heute bin ich lästig, aber ich habe noch folgende frage:
wie kann ich leerzeilen in einem sheet löschen. wie lautet hier das vba-command im script?
danke im voraus!
lg,
helmut
Sub delete_lines()
GetMoreSpeed True
Dim FL, LL, i, Spalte
FL = InputBox("erste Zeile?")
LL = InputBox("letzte Zeile?")
For i = LL To FL Step -1
Spalte = Range("IV" & i).End(xlToLeft).Column
If Spalte = 1 And Cells(i, 1) = "" Then
Rows(i).EntireRow.Delete
End If
Next
GetMoreSpeed False
End Sub
Sub GetMoreSpeed(bYesNo As Boolean)
Application.ScreenUpdating = Not (bYesNo)
Application.EnableEvents = Not (bYesNo)
Application.Calculation = IIf(bYesNo, xlCalculationManual, xlCalculationAutomatic)
If Not bYesNo Then Calculate
End Sub
Sub tt()
Dim Zei As Long
Zei = ActiveSheet.UsedRange.SpecialCells(xlCellTypeLastCell).Row
Range("T1:T" & Zei).FormulaLocal = "=Anzahl2(A1:S1)=0"
Range("A1:T" & Zei).Sort Key1:=Range("T1"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("T1:T" & Zei).ClearContents
End Sub