Public Function Outline_InColumnAddress(rngTest As Range) As Range
On Error Resume Next
Dim lOffset As Long
Dim lLevel As Long
lLevel = rngTest(1, 1).EntireColumn.outlineLevel
If lLevel = 1 Then GoTo TheExit
Do While rngTest(1, 1).Column > 1
If rngTest(1, 1).offset(0, -1).EntireColumn.outlineLevel = lLevel Then
Set rngTest = Union(rngTest, rngTest.offset(0, -1))
Else
Exit Do
End If
Loop
Do While rngTest(1, rngTest.Columns.Count).Column < 255
If rngTest(1, rngTest.Columns.Count).offset(0, 1).EntireColumn.outlineLevel = lLevel Then
Set rngTest = Union(rngTest, rngTest.offset(0, 1))
Else
Exit Do
End If
Loop
Set Outline_InColumnAddress = rngTest
TheExit:
Outline_InColumnAddress = False
End Function