我有3个型号:
Sub Test()
Application.ScreenUpdating = False
Dim i As Integer
Dim Lastrow As Long
Lastrow = Cells(Rows.Count, "A").End(xlUp).Row
For i = 2 To Lastrow
'To hide sheets
Sheets(Cells(i, 1).Value).Visible = False
'To hide row on sheet
Rows(Cells(i, 2).Value).Hidden = True
'To hide row on specific sheet
Sheets(Cells(i, 1).Value).Rows(Cells(i, 2).Value).Hidden = True
Next
Application.ScreenUpdating = True
End Sub
对于每个订单,我想根据销售人员的佣金率计算佣金。如何通过订单的客户从Salesperson.rb模型中检索销售人员的佣金率?