Professional Documents
Culture Documents
OTS
OTS
OTS
'
' OTS Macro
'
Dim ct2rval, h, I, J, k, l, m, n, p, q, d, z, r, s, t As Integer
h
J
k
l
m
n
p
q
r
s
t
=
=
=
=
=
=
=
=
=
=
=
2
2
2
2
2
2
2
2
2
2
2
h = h + 1
End If
'************************* Total OO Qty(RoHS) 3rd col of OTS *******************
****
If Cells.Item(I, 2) = "Total OO Qty(RoHS)" Then
Sheets("ots").Cells(J, 3).Value = Sheets("Detail").Cells(I, 3).Value
J = J + 1
End If
'************************** ROP 4th col of OTS *********************************
****
If Cells.Item(I, 2) = "ROP" Then
Sheets("ots").Cells(k, 4).Value = Sheets("Detail").Cells(I, 3).Value
k = k + 1
End If
'************************** SIS 5th col of OTS *********************************
****
If Cells.Item(I, 2) = "SIS" Then
Sheets("ots").Cells(l, 5).Value = Sheets("Detail").Cells(I, 3).Value
l = l + 1
End If
'************************* Max Bucket Backlog 6th col of OTS *******************
****
If Cells.Item(I, 2) = "Max Bucket Backlog" Then
Sheets("ots").Cells(m, 6).Value = Sheets("Detail").Cells(I, 3).Value
m = m + 1
End If
'************************* CT2R 7th col of OTS ********************************
****
If Cells.Item(I, 2) = "CT2R" Then
ct2rval = Sheets("Detail").Cells(I, 3).Value
Sheets("ots").Cells(n, 7).Value = Sheets("Detail").Cells(I, 3).Value
n = n + 1
End If
'************************* Total Supply CT2R 8th col of OTS *******************
*****************
If Cells.Item(I, 2) = "Total Supply (RoHS)" Then
Sheets("ots").Cells(p, 8).Value = 0
For z = 4 To ct2rval
Sheets("ots").Cells(p, 8).Value = Sheets("ots").Cells(p, 8).Value + Sheets("Deta
il").Cells(I, z).Value
Next
p = p + 1
ct2rval = 0
End If
'************************* Backlog With CT2R 9th col of OTS *******************
*****************
If Cells.Item(I, 2) = "Demand(Scheduled)(RoHS)" Then
Sheets("ots").Cells(q, 9).Value = 0
For z = 4 To ct2rval
Sheets("ots").Cells(q, 9).Value = Sheets("ots").Cells(q, 9).Value + Sheets("Deta
il").Cells(I, z).Value
Next
q = q + 1
ct2rval = 0
End If
'************** Demand(Unconstrained)(RoHS)- 90 Days 10th col of OTS **********
******
If Cells.Item(I, 2) = "Demand(Unconstrained)(RoHS)" Then
Sheets("ots").Cells(r, 10).Value = 0
For d = 4 To 94
Sheets("ots").Cells(r, 10).Value = Sheets("ots").Cells(r, 10).Value + Sheets("De
tail").Cells(I, d).Value
Next
r = r + 1
End If
'************** Unscheduled BKG(Scheduled)(RoHS) 11th col of OTS ***************
******
If Cells.Item(I, 2) = "Unscheduled BKG(Scheduled)(RoHS)" Then
Sheets("ots").Cells(s, 11).Value = Sheets("Detail").Cells(I, 3).Value
s = s + 1
End If
'******************** DAU 13th Col of OTS *************************************
'--------------- NOT YET CODED ------------------------'********************** Days of Suplly 14th Col of OTS ****************
'---------- NOT YET CODED ---------------------------------'************************** BUYER 15th col of OTS ******************************
*******
If Cells.Item(I, 2) = "Buyer" Then
Sheets("ots").Cells(t, 15).Value = Sheets("Detail").Cells(I, 3).Value
t = t + 1
End If
'**************************** END OF ONE ROW ***********************************
*****************************************
Next
'
End Sub