'
'Consolidate header information into a single column in those
'cases where the headers are split between two columns.
'
'Parameters: xlWS, the Worksheet object to manipulate
' strCol, the column to be edited
'
Public Function EditHeaders(xlWS As Excel.Worksheet, _
strCol As String) As Boolean
Dim iRowCount As Integer
Dim i As Integer
Dim strRange As String
Dim strHeader As String
Dim xlCell As Range
iRowCount = xlWS.UsedRange.Rows.Count
strRange = strCol & "1:" & strCol & iRowCount
For Each xlCell In xlWS.Range(strRange)
strHeader = xlCell.Value
If (strHeader <> "" And xlCell.Offset(0, 1) = "") Then
xlCell.Offset(0, 1).Value = strHeader
End If
Next xlCell
End Function