Ghi VBA ra để mọi người góp ý tối ưu 
Function NgayNghi(rng As Range) As String
Dim icl As Integer, irow As Integer
NgayNghi = ""
irow = rng.row
If Cells(irow, 36).Value > 0 Then
NgayNghi = NgayNghi & "Nghi phep " & Cells(irow, 36).Value & " h "
End If
If Cells(irow, 37).Value > 0 Then
If Len(NgayNghi) > 0 Then
NgayNghi = NgayNghi & ", Nghi tru luong " & Cells(irow, 37).Value & " h "
Else
NgayNghi = "Nghi tru luong " & Cells(irow, 37).Value & " h "
End If
End If
For icl = 4 To rng.Columns.Count + 3
If Cells(irow, icl).Value < 8 Then
If Cells(irow, icl).Interior.Color <> 65535 Then
NgayNghi = NgayNghi & "(" & Day(Cells(8, icl).Value) & "/" & Month(Cells(8, icl).Value)
Exit For
End If
End If
Next
For icl = icl + 1 To rng.Columns.Count + 3
If Cells(irow, icl).Value < 8 Then
If Cells(irow, icl).Interior.Color <> 65535 Then
NgayNghi = NgayNghi & ", " & Day(Cells(8, icl).Value) & "/" & Month(Cells(8, icl).Value)
End If
End If
Next
If Len(NgayNghi) > 0 Then NgayNghi = NgayNghi & ")"
End Function