Question: The following code checks if the value in J 1 2 ( ex: 7 0 0 ) is less than 5 0 0 . Since

The following code checks if the value in J12(ex: 700) is less than 500. Since it is not, S2 is populated in J18 and 180 is divided by the value in J14(ex: 355/180=2). Edit the code to implement the following.
If cs.Range("J6")="DC" Then
If cs.Range("J12")<500 Then
cs.Range("J18")="S1"
cs.Range("J20")= Application.WorksheetFunction.Ceiling(cs.Range("J14")/360,1)
Else
cs.Range("J18")="S2"
cs.Range("J20")= Application.WorksheetFunction.Ceiling(cs.Range("J14")/180,1)
End If
Edit the code to implement the following
For S1:
If DC is selected in J6, Then if value entered in J12 is 0-330 divide J14 by 360.
If DC is selected in J6, Then If value entered J12 is 331-500 and divide J14 by 240.
For S2:
If DC is selected in J6, Then if value entered in J12 is 500-660 divide J14 by 180.
If DC is selected in J6, Then If value entered J12 is 661-1000 and divide J14 by 120.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!