هل ممكن تعديل هذا الكود
Private Function kh_Match(Cel As Range) As Integer
Dim TE
On Error Resume Next
TE = Application.VLookup(Cel(1), Range("R3:T20"), Application.Match(Cel(2), Range("S2:T2"), 0) + 1, 0)
If Err.Number <> 0 Then kh_Match = 0: Err.Clear Else kh_Match = TE
End Function
Private Function Kh_MyItem(iR As Integer, iRR As Integer, N As Integer)
With MyRngdate
' myArray(iRR, 1) = .Cells(iR, cSeat_Number)
myArray(iRR, 1) = .Cells(iR, cStudents)
myArray(iRR, 2) = .Cells(iR, N)
myArray(iRR, 4) = .Cells(iR, N + 1)
myArray(iRR, 3) = " " & .Cells(iR, cClass)
End With
End Function