Professional Documents
Culture Documents
UserPrice = Worksheets("Data").Range("I2").Value
NetPrice = Worksheets("Data").Range("J2").Value
RelNum = Worksheets("Data").Range("C2").Value
For i = 2 To 12
Next i
Worksheets("Dashboard").Range("C22").Value = UserPrice
Sub DashOutStock()
For i = 2 To 45700
OutStock = OutStock + 1
Worksheets("Dashboard").Range("F13:G19").Value = OutStock
End If
Next i
End Sub
Sub DashAvgPrice()
Dim i As Long, Avg As Double, Price As Double, TotalPrice As Double, Items As Integer, TotalItems
As Long
For i = 2 To 45700
Next
Worksheets("Dashboard").Range("D13:E19").Value = Avg
End Sub
Sub DashAvgLowPrice()
Dim i As Long, Avg As Double, LowPrice As Double, TotalPrice As Double, Items As Long, TotalItems
As Long
For i = 2 To 45700
Next
Worksheets("Dashboard").Range("J13:K19").Value = Avg
End Sub
Sub NewestRel()
For i = 2 To 45700
Newest = ID
End If
Worksheets("Dashboard").Range("B13:C19").Value = Newest
Next
End Sub
Sub ClasABC()
For i = 2 To 1200
Next i
End Sub
Sub ClassicABC()
Dim TotPrice As Single, i As Integer, Price As Single, Units As Integer, Avg As Single, Tot As Integer
For i = 2 To 1200
Next
End Sub
G1 = G1 + TotalPrice
ElemC1 = ElemC1 + 1
End If
G2 = G2 + TotalPrice
ElemC2 = ElemC2 + 1
End If
G3 = G3 + TotalPrice
ElemC3 = ElemC3 + 1
End If
G1 = G1 + TotalPrice
ElemC1 = ElemC1 + 1
End If
G2 = G2 + TotalPrice
ElemC2 = ElemC2 + 1
End If
G3 = G3 + TotalPrice
ElemC3 = ElemC3 + 1
End If
tmpLow = arrLbound
tmpHi = arrUbound
tmpLow = tmpLow + 1
Wend
tmpHi = tmpHi - 1
Wend
vSwap = vArray(tmpLow)
vArray(tmpLow) = vArray(tmpHi)
vArray(tmpHi) = vSwap
tmpLow = tmpLow + 1
tmpHi = tmpHi - 1
End If
Wend
End Sub
Sub ProcessData_Quicksort()
'and sort the data from smallest to largest using VBA Quicksort.
For i = 1 To LastRow
For j = 1 To 10
Next j
Next i
'
'From here on, your "MyData" array is sorted from smallest to largest
For i = 1 To LastRow
Next
End Sub
Rep = Rep + 1
Class = "C1"
Class = "C2"
Class = "C3"
End If
G1 = G1 + TotalPrice
ElemC1 = ElemC1 + 1
End If
G2 = G2 + TotalPrice
ElemC2 = ElemC2 + 1
End If
If Class = "C3" Then
G3 = G3 + TotalPrice
ElemC3 = ElemC3 + 1
End If
Range("L1").Value = Range("G2").Value
Range("M1").Value = Range("G3").Value
Range("N1").Value = Range("G4").Value
Range("G2").Value = Round(Cent1, 2)
Range("G3").Value = Round(Cent2, 2)
Range("G4").Value = Round(Cent3, 2)
Loop