وعليكم السلام ورحمة الله تعالى وبركاته
بطريقة أخرى
Option Explicit
Sub test()
Dim WS As Worksheet, tbl As Long, tmp As Long, i As Long
Dim n As String, Max As Long, ky As Boolean
Max = 34
Set WS = Sheets("ورقة1")
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
On Error Resume Next
tbl = WS.Columns("B:M").Find(What:="*", SearchDirection:=xlPrevious, SearchOrder:=xlByRows).Row
On Error GoTo 0
tbl = IIf(tbl = 0, 6, tbl)
tbl = IIf(tbl > Max, Max, tbl)
WS.Range("N6:N" & tbl).ClearContents
For tmp = 6 To tbl
n = ""
ky = False
For i = 2 To 13
If WS.Cells(tmp, i).Value <> "" Then
n = IIf(n = "", WS.Cells(5, i).Text, n & " - " & WS.Cells(5, i).Text)
If Not ky Then
WS.Cells(tmp, 14).NumberFormat = WS.Cells(tmp, i).NumberFormat
ky = True
End If
End If
Next i
WS.Cells(tmp, 14).Value = n
Next tmp
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub
DATA V1.xlsb