Option Explicit

Dim cell As Range, plage As Range
Dim n&, derln&, dercol&


Sub Macro()

    'Range("G10:BR10").Select
    'Range(Selection, Selection.End(xlToRight)).Select
    'Range(Selection, Selection.End(xlDown)).Select
    
    n = Range("G10:BR10").Select
    derln = Range("G" & Rows.Count).End(xlUp).Row
    dercol = Cells(3, Columns.Count).End(xlToLeft).Column
    n = 1
    For Each cell In Range(Cells(10, 7), Cells(derln, dercol))
    
        If cell.Column = 7 And cell.Value <> "" Then
            If n = 1 Then
                Set plage = Range("G" & cell.Row & ":BR" & cell.Row)
                n = 2
            Else
                Set plage = Union(plage, Range("G" & cell.Row & ":BR" & cell.Row))
            End If
                
        Else
            If cell <> "" Then
                If n = 1 Then
                    Set plage = cell
                    n = 2
                Else
                    Set plage = Union(plage, cell)
                End If
            End If
        End If
    Next cell
    plage.Select
End Sub

