Code: Select all
'SizeL
If UserForm1.ComboBox1.Value = Car1.CarLicen And UserForm1.TextBox2.Value = 1 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range1L
ElseIf UserForm1.ComboBox1.Value = Car1.CarLicen And UserForm1.TextBox2.Value = 2 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range2L
ElseIf UserForm1.ComboBox1.Value = Car1.CarLicen And UserForm1.TextBox2.Value = 3 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range3L
ElseIf UserForm1.ComboBox1.Value = Car1.CarLicen And UserForm1.TextBox3.Value <= 600 Then
ws.Cells(i, 7) = rangeOver1
ElseIf UserForm1.ComboBox1.Value = Car1.CarLicen And UserForm1.TextBox3.Value <= 800 Then
ws.Cells(i, 7) = rangeOver2
ElseIf UserForm1.ComboBox1.Value = Car1.CarLicen And UserForm1.TextBox3.Value <= 1000 Then
ws.Cells(i, 7) = rangeOver3
ElseIf UserForm1.ComboBox1.Value = Car1.CarLicen And UserForm1.TextBox3.Value <= 1499 Then
ws.Cells(i, 7) = rangeOver4
ElseIf UserForm1.ComboBox1.Value = Car1.CarLicen And UserForm1.TextBox3.Value >= 1500 Then
ws.Cells(i, 7) = rangeOver5
End If
If UserForm1.ComboBox1.Value = Car2.CarLicen And UserForm1.TextBox2.Value = 1 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range1L
ElseIf UserForm1.ComboBox1.Value = Car2.CarLicen And UserForm1.TextBox2.Value = 2 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range2L
ElseIf UserForm1.ComboBox1.Value = Car2.CarLicen And UserForm1.TextBox2.Value = 3 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range3L
ElseIf UserForm1.ComboBox1.Value = Car2.CarLicen And UserForm1.TextBox3.Value <= 600 Then
ws.Cells(i, 7) = rangeOver1
ElseIf UserForm1.ComboBox1.Value = Car2.CarLicen And UserForm1.TextBox3.Value <= 800 Then
ws.Cells(i, 7) = rangeOver2
ElseIf UserForm1.ComboBox1.Value = Car2.CarLicen And UserForm1.TextBox3.Value <= 1000 Then
ws.Cells(i, 7) = rangeOver3
ElseIf UserForm1.ComboBox1.Value = Car2.CarLicen And UserForm1.TextBox3.Value <= 1499 Then
ws.Cells(i, 7) = rangeOver4
ElseIf UserForm1.ComboBox1.Value = Car2.CarLicen And UserForm1.TextBox3.Value >= 1500 Then
ws.Cells(i, 7) = rangeOver5
End If
If UserForm1.ComboBox1.Value = Car3.CarLicen And UserForm1.TextBox2.Value = 1 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range1L
ElseIf UserForm1.ComboBox1.Value = Car3.CarLicen And UserForm1.TextBox2.Value = 2 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range2L
ElseIf UserForm1.ComboBox1.Value = Car3.CarLicen And UserForm1.TextBox2.Value = 3 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range3L
ElseIf UserForm1.ComboBox1.Value = Car3.CarLicen And UserForm1.TextBox3.Value <= 600 Then
ws.Cells(i, 7) = rangeOver1
ElseIf UserForm1.ComboBox1.Value = Car3.CarLicen And UserForm1.TextBox3.Value <= 800 Then
ws.Cells(i, 7) = rangeOver2
ElseIf UserForm1.ComboBox1.Value = Car3.CarLicen And UserForm1.TextBox3.Value <= 1000 Then
ws.Cells(i, 7) = rangeOver3
ElseIf UserForm1.ComboBox1.Value = Car3.CarLicen And UserForm1.TextBox3.Value <= 1499 Then
ws.Cells(i, 7) = rangeOver4
ElseIf UserForm1.ComboBox1.Value = Car3.CarLicen And UserForm1.TextBox3.Value >= 1500 Then
ws.Cells(i, 7) = rangeOver5
End If
If UserForm1.ComboBox1.Value = Car4.CarLicen And UserForm1.TextBox2.Value = 1 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range1L
ElseIf UserForm1.ComboBox1.Value = Car4.CarLicen And UserForm1.TextBox2.Value = 2 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range2L
ElseIf UserForm1.ComboBox1.Value = Car4.CarLicen And UserForm1.TextBox2.Value = 3 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range3L
ElseIf UserForm1.ComboBox1.Value = Car4.CarLicen And UserForm1.TextBox3.Value <= 600 Then
ws.Cells(i, 7) = rangeOver1
ElseIf UserForm1.ComboBox1.Value = Car4.CarLicen And UserForm1.TextBox3.Value <= 800 Then
ws.Cells(i, 7) = rangeOver2
ElseIf UserForm1.ComboBox1.Value = Car4.CarLicen And UserForm1.TextBox3.Value <= 1000 Then
ws.Cells(i, 7) = rangeOver3
ElseIf UserForm1.ComboBox1.Value = Car4.CarLicen And UserForm1.TextBox3.Value <= 1499 Then
ws.Cells(i, 7) = rangeOver4
ElseIf UserForm1.ComboBox1.Value = Car4.CarLicen And UserForm1.TextBox3.Value >= 1500 Then
ws.Cells(i, 7) = rangeOver5
End If
If UserForm1.ComboBox1.Value = Car5.CarLicen And UserForm1.TextBox2.Value = 1 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range1L
ElseIf UserForm1.ComboBox1.Value = Car5.CarLicen And UserForm1.TextBox2.Value = 2 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range2L
ElseIf UserForm1.ComboBox1.Value = Car5.CarLicen And UserForm1.TextBox2.Value = 3 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range3L
ElseIf UserForm1.ComboBox1.Value = Car5.CarLicen And UserForm1.TextBox3.Value <= 600 Then
ws.Cells(i, 7) = rangeOver1
ElseIf UserForm1.ComboBox1.Value = Car5.CarLicen And UserForm1.TextBox3.Value <= 800 Then
ws.Cells(i, 7) = rangeOver2
ElseIf UserForm1.ComboBox1.Value = Car5.CarLicen And UserForm1.TextBox3.Value <= 1000 Then
ws.Cells(i, 7) = rangeOver3
ElseIf UserForm1.ComboBox1.Value = Car5.CarLicen And UserForm1.TextBox3.Value <= 1499 Then
ws.Cells(i, 7) = rangeOver4
ElseIf UserForm1.ComboBox1.Value = Car5.CarLicen And UserForm1.TextBox3.Value >= 1500 Then
ws.Cells(i, 7) = rangeOver5
End If
If UserForm1.ComboBox1.Value = Car6.CarLicen And UserForm1.TextBox2.Value = 1 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range1L
ElseIf UserForm1.ComboBox1.Value = Car6.CarLicen And UserForm1.TextBox2.Value = 2 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range2L
ElseIf UserForm1.ComboBox1.Value = Car6.CarLicen And UserForm1.TextBox2.Value = 3 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range3L
ElseIf UserForm1.ComboBox1.Value = Car6.CarLicen And UserForm1.TextBox3.Value <= 600 Then
ws.Cells(i, 7) = rangeOver1
ElseIf UserForm1.ComboBox1.Value = Car6.CarLicen And UserForm1.TextBox3.Value <= 800 Then
ws.Cells(i, 7) = rangeOver2
ElseIf UserForm1.ComboBox1.Value = Car6.CarLicen And UserForm1.TextBox3.Value <= 1000 Then
ws.Cells(i, 7) = rangeOver3
ElseIf UserForm1.ComboBox1.Value = Car6.CarLicen And UserForm1.TextBox3.Value <= 1499 Then
ws.Cells(i, 7) = rangeOver4
ElseIf UserForm1.ComboBox1.Value = Car6.CarLicen And UserForm1.TextBox3.Value >= 1500 Then
ws.Cells(i, 7) = rangeOver5
End If
'SizeM
If UserForm1.ComboBox1.Value = Car7.CarLicen And UserForm1.TextBox2.Value = 1 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range1M
ElseIf UserForm1.ComboBox1.Value = Car7.CarLicen And UserForm1.TextBox2.Value = 2 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range2M
ElseIf UserForm1.ComboBox1.Value = Car7.CarLicen And UserForm1.TextBox2.Value = 3 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range2M
ElseIf UserForm1.ComboBox1.Value = Car7.CarLicen And UserForm1.TextBox3.Value <= 600 Then
ws.Cells(i, 7) = rangeOver1
ElseIf UserForm1.ComboBox1.Value = Car7.CarLicen And UserForm1.TextBox3.Value <= 800 Then
ws.Cells(i, 7) = rangeOver2
ElseIf UserForm1.ComboBox1.Value = Car7.CarLicen And UserForm1.TextBox3.Value <= 1000 Then
ws.Cells(i, 7) = rangeOver3
ElseIf UserForm1.ComboBox1.Value = Car7.CarLicen And UserForm1.TextBox3.Value <= 1499 Then
ws.Cells(i, 7) = rangeOver4
ElseIf UserForm1.ComboBox1.Value = Car7.CarLicen And UserForm1.TextBox3.Value >= 1500 Then
ws.Cells(i, 7) = rangeOver5
End If
If UserForm1.ComboBox1.Value = Car8.CarLicen And UserForm1.TextBox2.Value = 1 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range1M
ElseIf UserForm1.ComboBox1.Value = Car8.CarLicen And UserForm1.TextBox2.Value = 2 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range2M
ElseIf UserForm1.ComboBox1.Value = Car8.CarLicen And UserForm1.TextBox2.Value = 3 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range2M
ElseIf UserForm1.ComboBox1.Value = Car8.CarLicen And UserForm1.TextBox3.Value <= 600 Then
ws.Cells(i, 7) = rangeOver1
ElseIf UserForm1.ComboBox1.Value = Car8.CarLicen And UserForm1.TextBox3.Value <= 800 Then
ws.Cells(i, 7) = rangeOver2
ElseIf UserForm1.ComboBox1.Value = Car8.CarLicen And UserForm1.TextBox3.Value <= 1000 Then
ws.Cells(i, 7) = rangeOver3
ElseIf UserForm1.ComboBox1.Value = Car8.CarLicen And UserForm1.TextBox3.Value <= 1499 Then
ws.Cells(i, 7) = rangeOver4
ElseIf UserForm1.ComboBox1.Value = Car8.CarLicen And UserForm1.TextBox3.Value >= 1500 Then
ws.Cells(i, 7) = rangeOver5
End If
If UserForm1.ComboBox1.Value = Car9.CarLicen And UserForm1.TextBox2.Value = 1 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range1M
ElseIf UserForm1.ComboBox1.Value = Car9.CarLicen And UserForm1.TextBox2.Value = 2 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range2M
ElseIf UserForm1.ComboBox1.Value = Car9.CarLicen And UserForm1.TextBox2.Value = 3 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range2M
ElseIf UserForm1.ComboBox1.Value = Car9.CarLicen And UserForm1.TextBox3.Value <= 600 Then
ws.Cells(i, 7) = rangeOver1
ElseIf UserForm1.ComboBox1.Value = Car9.CarLicen And UserForm1.TextBox3.Value <= 800 Then
ws.Cells(i, 7) = rangeOver2
ElseIf UserForm1.ComboBox1.Value = Car9.CarLicen And UserForm1.TextBox3.Value <= 1000 Then
ws.Cells(i, 7) = rangeOver3
ElseIf UserForm1.ComboBox1.Value = Car9.CarLicen And UserForm1.TextBox3.Value <= 1499 Then
ws.Cells(i, 7) = rangeOver4
ElseIf UserForm1.ComboBox1.Value = Car9.CarLicen And UserForm1.TextBox3.Value >= 1500 Then
ws.Cells(i, 7) = rangeOver5
End If
'SizeS
If UserForm1.ComboBox1.Value = Car10.CarLicen And UserForm1.TextBox2.Value = 1 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range1S
ElseIf UserForm1.ComboBox1.Value = Car10.CarLicen And UserForm1.TextBox2.Value = 2 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range2S
ElseIf UserForm1.ComboBox1.Value = Car10.CarLicen And UserForm1.TextBox2.Value = 3 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range2S
ElseIf UserForm1.ComboBox1.Value = Car10.CarLicen And UserForm1.TextBox3.Value <= 600 Then
ws.Cells(i, 7) = rangeOver1
ElseIf UserForm1.ComboBox1.Value = Car10.CarLicen And UserForm1.TextBox3.Value <= 800 Then
ws.Cells(i, 7) = rangeOver2
ElseIf UserForm1.ComboBox1.Value = Car10.CarLicen And UserForm1.TextBox3.Value <= 1000 Then
ws.Cells(i, 7) = rangeOver3
ElseIf UserForm1.ComboBox1.Value = Car10.CarLicen And UserForm1.TextBox3.Value <= 1499 Then
ws.Cells(i, 7) = rangeOver4
ElseIf UserForm1.ComboBox1.Value = Car10.CarLicen And UserForm1.TextBox3.Value >= 1500 Then
ws.Cells(i, 7) = rangeOver5
End If
If UserForm1.ComboBox1.Value = Car11.CarLicen And UserForm1.TextBox2.Value = 1 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range1S
ElseIf UserForm1.ComboBox1.Value = Car11.CarLicen And UserForm1.TextBox2.Value = 2 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range2S
ElseIf UserForm1.ComboBox1.Value = Car11.CarLicen And UserForm1.TextBox2.Value = 3 And UserForm1.TextBox3.Value <= 399 Then
ws.Cells(i, 7) = range2S
ElseIf UserForm1.ComboBox1.Value = Car11.CarLicen And UserForm1.TextBox3.Value <= 600 Then
ws.Cells(i, 7) = rangeOver1
ElseIf UserForm1.ComboBox1.Value = Car11.CarLicen And UserForm1.TextBox3.Value <= 800 Then
ws.Cells(i, 7) = rangeOver2
ElseIf UserForm1.ComboBox1.Value = Car11.CarLicen And UserForm1.TextBox3.Value <= 1000 Then
ws.Cells(i, 7) = rangeOver3
ElseIf UserForm1.ComboBox1.Value = Car11.CarLicen And UserForm1.TextBox3.Value <= 1499 Then
ws.Cells(i, 7) = rangeOver4
ElseIf UserForm1.ComboBox1.Value = Car11.CarLicen And UserForm1.TextBox3.Value >= 1500 Then
ws.Cells(i, 7) = rangeOver5
End If