A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi,
I spotted that later and have already edited the code to start in Col C. here it is again, you will still need to change the start row
Sub Name_Ranges()
Dim LastRow As Long, Namerange As Range
Dim myRange As Range
LastRow = Cells(Cells.Rows.Count, "B").End(xlUp).Row
Set myRange = Range("B2:B" & LastRow)
For Each c In myRange
If c.Value <> c.Offset(1).Value Then
If Namerange Is Nothing Then
Set Namerange = c
Else
Set Namerange = Union(Namerange, c)
End If
ActiveWorkbook.Names.Add Name:=c.Value, RefersToR1C1:=Namerange.Offset(, 1).Resize(, 15)
Set Namerange = Nothing
Else
If Namerange Is Nothing Then
Set Namerange = c
Else
Set Namerange = Union(Namerange, c)
End If
End If
Next
End Sub