Advertisement
Advertisement
| 10.13.2008 at 09:26PM PDT, ID: 23811694 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: |
Ex Code:
Sub test()
answer = mySort(3, 1, 2, "Sample", "Test")
MsgBox "Sorted row numbers of Sample orgs that Test:"
i = 1
Do While answer(i) <> -1
MsgBox answer(i)
i = i + 1
Loop
End Sub
Function mySort(objectiveCol As Integer, conditionCol1 As Integer, conditionCol2 As Integer, conditionValue1 As String, conditionValue2 As String)
Dim indices(10) As Integer
For i = 1 To 10
indices(i) = -1
Next
For i = 3 To 27
If Cells(i, conditionCol1) = conditionValue1 And Cells(i, conditionCol2) = conditionValue2 Then
If indices(1) = -1 Then
indices(1) = i
Else
j = 1
Do While indices(j) <> -1
If Cells(i, objectiveCol).Value > Cells(indices(j), objectiveCol).Value Then
For k = 9 To j + 1 Step -1
indices(k) = indices(k - 1)
Next
indices(j) = i
Exit Do
End If
j = j + 1
Loop
End If
End If
Next
mySort = indices
End Function
|