Option Compare Text 'facultatif, la casse est ignorée
Sub Importer()
Dim F As Worksheet, tablo, ncol, i&, n&, j%
Set F = ThisWorkbook.Sheets("RECAP")
Application.ScreenUpdating = False
F.Rows("2:" & F.Rows.Count).Delete 'RAZ
On Error Resume Next
With Workbooks.Open(ThisWorkbook.Path & "\Balance.xlsx").Sheets(1) 'adaptable
tablo = .[A1].CurrentRegion 'matrice, plus rapide
ncol = UBound(tablo, 2)
n = 1
For i = 2 To UBound(tablo)
If tablo(i, 2) Like "D*" Then
n = n + 1
For j = 1 To ncol
tablo(n, j) = tablo(i, j)
Next
End If
Next
.Parent.Close False
End With
'---restitution---
F.[A1].Resize(n, ncol) = tablo
'---bordures---
With F.[A1].CurrentRegion
.Borders.Weight = xlThin
.Offset(1).Resize(.Rows.Count - 1).Borders(xlInsideHorizontal).Weight = xlHairline
End With
End Sub