AW: Zellen und Zeilen löschen + Zellinhalte erstzten
20.10.2012 16:25:00
fcs
Hallo Günther,
hier ein Makro, das dir die Handarbeit abnehmen kann.
Gruß
Franz
Sub CleanUp_Sheet()
Dim wks As Worksheet, rngCells As Range, rngCell As Range
Dim Zeile As Long, Spalte As Long
Dim arrTeil, intI As Long
Dim strStart, iCountStart As Integer
Set wks = ActiveSheet
Application.ScreenUpdating = False
With wks
'Zeilen löschen
arrTeil = Array(""
If rngCell.Text Like "StartTime=""" & "*" Then
Select Case iCountStart
Case 0
strStart = rngCell.Text: iCountStart = iCountStart + 1
Case 1
rngCell.Value = strStart: iCountStart = iCountStart + 1
Case 2
rngCell.Value = strStart & ">": iCountStart = iCountStart + 1
End Select
End If
Next
'In Spalte C letztes tm ändern
If Not rngCells Is Nothing Then
rngCells.Delete shift:=xlShiftToLeft
End If
.Cells(.Rows.Count, 3).End(xlUp).Value = "tm=""120"""
End With
Application.ScreenUpdating = True
End Sub