Const FORMULA_REFERSTO As String = _
"=OFFSET('<sheet>'!<cell>,0,0,<height>,1)"
Dim wbk As Workbook
Dim Sht As Worksheet
Dim rng6, rng7 As Range
Dim cl As Object
Dim c As Long, lastrow As Long
Dim strAddr As Variant
Dim strShName, strHdrName, strCol As String
Set wbk = ActiveWorkbook
Set Sht = wbk.Worksheets("Raw")
c = Sht.Cells.SpecialCells(xlLastCell).Column
Set rng6 = Sht.Range("A1", Sht.Range("A1").Offset(0, c))
For Each cl In rng6
If cl.Value <> "" Then
strShName = Replace(Sht.Name, " ", "_", 1)
strHdrName = Replace(cl.Value, " ", "_", 1)
lastrow = Sht.Cells(Sht.Rows.Count, cl.Column).End(xlUp).Row
Set rng7 = Sht.Range(cl, cl.End(xlDown))
Sht.Names.Add Name:=strShName & strHdrName, _
RefersTo:=Replace(Replace(Replace(FORMULA_REFERSTO, "<sheet>", Sht.Name), "<cell>", cl.Address), "<height>", lastrow)
End If
Next cl
End Sub