Sub SelectColonnes(Nomcol$, deb&, fin&)
Dim mincol%, minlig&, nom As Name, n&, maxcol%, lig&, maxlig&
mincol = Columns.Count
minlig = Rows.Count
On Error Resume Next 'si une plage est vide
For Each nom In ThisWorkbook.Names
For n = Len(nom.Name) To 1 Step -1
If Not IsNumeric(Mid(nom.Name, n, 1)) Then Exit For
Next
n = Val(Mid(nom.Name, n + 1))
If (nom.Name Like Nomcol & "*" Or nom.Name Like "*!" & Nomcol & "*") _
And n >= deb And n <= fin Then
With Range(nom.Name)
If .Column < mincol Then mincol = .Column
If .Column > maxcol Then maxcol = .Column
If .Row < minlig Then minlig = .Row
lig = 0
lig = .Find("*", , xlValues, , xlByRows, xlPrevious).Row
'lig = .Find("*", , xlFormulas, , xlByRows, xlPrevious).Row 'autre possibilité
If lig > maxlig Then maxlig = lig
End With
End If
Next
Range(Cells(minlig, mincol), Cells(maxlig, maxcol)).Select
'If maxlig = 0 Then MsgBox "Aucune sélection possible..." 'facultatif
End Sub