Marsdbginner
Technical User
I'm thinking that the below code says:
-if projectID A matches projectID B then sum the LOEs for planning and testing into project A and change the same for project B to 0
-if they don't match or if the LOE is 0 then go to next B
-when B reaches max go to next A
Would the below code loop through all of the B's before moving to the next A? If not how could I do this?
Do you see any errors?
Thanks in advance! Best Forums on the web!
-if projectID A matches projectID B then sum the LOEs for planning and testing into project A and change the same for project B to 0
-if they don't match or if the LOE is 0 then go to next B
-when B reaches max go to next A
Would the below code loop through all of the B's before moving to the next A? If not how could I do this?
Do you see any errors?
Code:
MaxInt = 500
For A = 1 To MaxInt + 1
For B = 2 To MaxInt + 1
If strProjectID(A) = strProjectID(B) Then
intPlanningLOE(A) = intPlanningLOE(A) + intPlanningLOE(B)
intTestingLOE(A) = intTestingLOE(A) + intTestingLOE(B)
'if B added to A change planning/testing LOEs to 0
intPlanningLOE(B) = 0
intTestingLOE(B) = 0
'if project IDs don't match or if the current planning/testing LOEs for B are 0 then next B
ElseIf strProjectID(A) <> strProjectID(B) Or intPlanningLOE(B) = 0 Then
Next B
End If
If B = MaxInt + 1 Then
GoTo nextA
End If
Next B
nextA:
Next A
Thanks in advance! Best Forums on the web!