Sub selectionvide()
On Error Resume Next
Range("B3:B22").SpecialCells(xlCellTypeBlanks).Select
On Error GoTo 0
End Sub
Sub selectionvide()
On Error Resume Next
With Range("B3:B22")
'nettoie les cellules contenant du texte même invisible
.SpecialCells(xlCellTypeConstants, 2).ClearContents
'selectionne les cellule vide
.SpecialCells(xlCellTypeBlanks).Select
End With
On Error GoTo 0
End Sub
Sub Macro2()
Dim dl&
dl = Cells(Rows.Count, "A").End(3).Row
Range("B1:B" & dl).FormulaR1C1 = _
"=IF(ISERR(SEARCH(CHAR(32),RC[-1]))*ISERR(SEARCH(CHAR(160),RC[-1]))=0,1,"""")"
Columns("B:B").SpecialCells(xlCellTypeFormulas, 1).EntireRow.Delete
Columns("B:B").Clear
End Sub
(qui me semble très destructrice sauf erreur de ma part, non ?)
NB: Je n'ai pas ouvert la PJ, donc la phrase ci-dessus est sans doute caduque )
Sub selectionvide()
Dim c As Range, s As Range
For Each c In [B3:B22] 'plage à adapter
If c = "" Then Set s = Union(c, IIf(s Is Nothing, c, s))
Next
If Not s Is Nothing Then s.Select
End Sub
Sub selectionvide()
Application.ScreenUpdating = False
With [B2:B22]
.AutoFilter 1, ""
On Error Resume Next
.Offset(1).Resize(.Count - 1).SpecialCells(xlCellTypeVisible).Select
.Parent.AutoFilterMode = False
End With
End Sub