Começando com:
ExecutandoamacroMAIN()
:
DimDidSomethingAsBooleanSubMAIN()DidSomething=TrueWhileDidSomethingCallKompactDataWendCallRowKillerEndSubSubKompactData()DimNAsLong,iAsLongDimjAsLong,vAsVariantN=Cells(Rows.Count,"A").End(xlUp).Row
DidSomething = False
For j = 2 To 4
For i = 2 To N
v = Cells(i, j).Value
If (v <> "") And (Cells(i - 1, j) = "") And (Cells(i, 1) = Cells(i - 1, 1)) Then
Cells(i - 1, j) = v
Cells(i, j).ClearContents
DidSomething = True
End If
Next i
Next j
End Sub
Sub RowKiller()
Dim N As Long, i As Long, r As Range
N = Cells(Rows.Count, "A").End(xlUp).Row
With Application.WorksheetFunction
For i = N To 1 Step -1
Set r = Range(Cells(i, 1), Cells(i, 4))
If .CountBlank(r) = 3 Then
r.Delete Shift:=xlUp
End If
Next i
End With
End Sub
produzirá: