Welche Excel Version verwendest du?
Versuchs mal so:
Sub xyz()
Dim rng As Range
Dim LC&(1), LR&, A1 As Variant, A2 As Variant, R&, C%
fLC LC, ActiveSheet
If LC(0) < 3 Then LC(0) = 3
Set rng = Range("A1", Cells(LC(0) - 1, LC(1)))
A1 = rng.Value
A2 = rng.Formula
For R = 1 To UBound(A1)
For C = 1 To UBound(A1, 2)
If A1(R, C) = "" And A2(R, C) <> "" Then
Cells(R, C) = ""
End If
If R = LR + 1000 Then
Application.StatusBar = R
LR = LR + 1000
DoEvents
End If
Next
Next
Application.StatusBar = False
End Sub
Function fLC(ByRef LC&(), tSh As Worksheet)
Dim C%, R&, E1&, E2%, TV&, TV2&
E1 = Rows.Count
E2 = Columns.Count
With tSh
TV2 = .Cells(1, E2).End(xlToLeft).Column
For C = 1 To E2
TV = .Cells(E1, C).End(xlUp).Row
If TV > LC(0) Then LC(0) = TV
If TV <> 1 And C > TV2 Then LC(1) = C
Next
If LC(1) = 0 Then LC(1) = TV2
End With
End Function
|