I have this code, but i want to apply it to all 4 to 750 rows. I actually do not know much about vba. can somebody help me out?
Sub test()
dinstance = Range("AO4").Value
Weight = Range("AN4").Value
Dim type_truck As String
If distance <= 30 And Weight <= 1200 Then
type_truck = "Large Van"
ElseIf distance > 30 And Weight > 1200 And Weight <= 7500 Then
type_truck = "Large Truck 10 - 20t"
ElseIf distance > 30 And Weigth > 7500 And Weight <= 13000 Then
type_truck = "Large Truck > 20t"
Else
type_truck = "LHV"
End If
Range("AP4").Value = type_truck
End Sub