Vous êtes sur la page 1sur 9

Sub DUGmakeCR()

'If condition DHA is OFF & ON ??


'if maio contains NULL Values ( iqnore it )
'remove R2 to U10000
'Length for Loop
'Active TRXs

Dim wsidea As Worksheet


Set wsidea = Worksheets("Sheet1")

Dim wsresult As Worksheet


Set wsresult = Worksheets("Sheet6")

lngRoww = wsresult.Cells(Rows.Count, "B").End(xlUp).Row


MsgBox lngRoww

n = 2
ss = 2
For i = 2 To 7
MsgBox "i" & i
MsgBox wsresult.Range("M" & i)

'Check one DUG or second DUG based on TG + Check Site RBS 2000 or 6000 ?? to
activate or Tune Capacity ??

'Serach MCTR if TG exist or not RBS 2000 or 6000

'Length MCTR File

'Search what TG of Cell

For ix = 1 To 1000

If wsresult.Range("M" & i) = wsidea.Range("D" & ix) Then

'TG Name
'MsgBox VarType(wsidea.Range("BLK" & ix))

TG = wsidea.Range("BLM" & ix)


'MsgBox "TG1" & TG
'MsgBox VarType(TG)
TG2 = wsidea.Range("BSP" & ix)
'MsgBox "TG2" & TG2
'MsgBox VarType(TG2)

'Record

'BSC Name
BSC = wsidea.Range("C" & ix)
'BSPWRB
BSPWRB = wsidea.Range("EY" & ix)
'BSPWRT
BSPWRT = wsidea.Range("FA" & ix)
'NUMREQBPC CHGR-1
Dim NUMREQBPC1 As Integer
Dim NUMREQBPC2 As Integer
'typeval(wsidea.Range("BRS" & ix)
'MsgBox VarType(wsidea.Range("BRS" & ix))

NUMREQBPC1 = wsidea.Range("BRT" & ix)


NUMREQBPC1 = CInt(NUMREQBPC1)
'MsgBox VarType(NUMREQBPC1)
'NUMREQBPC CHGR-2
'NUMREQBPC2 = wsidea.Range("BVG" & ix)
'NUMREQBPC2 = CInt(NUMREQBPC2)

'If Maio has NULL Values ( Iqnore )


'MAIO
MAIO0 = wsidea.Range("BRC" & ix)
MAIO1 = wsidea.Range("BRD" & ix)
MAIO2 = wsidea.Range("BRE" & ix)
MAIO3 = wsidea.Range("BRF" & ix)
MAIO4 = wsidea.Range("BRG" & ix)
MAIO5 = wsidea.Range("BRH" & ix)
MAIO6 = wsidea.Range("BRI" & ix)

'DHA
DHA = wsidea.Range("PM" & ix)
'DTHAMR
DTHAMR = wsidea.Range("TH" & ix)
'SDCCH
SDCCH = wsidea.Range("BOL" & ix)

NameC = wsidea.Range("F" & ix)

'problem GC2010B
GoTo line1

End If

Next ix

'Search using TG of Cell ( Type of RBS )

line1:

'For ixx = 1 To 1000

'If TG = wsresult.Range("B" & ixx) Then


'
''TG = wsresult.Range("BLK" & ix)
''RBS 6000 ********************************************************************
'
'MsgBox "need MCTR"
'

Dim oRange As Range, aCell As Range, bCell As Range


Dim wsNCS As Worksheet
Dim SearCHString As String
Dim FoundAt As String
Set oRange = wsresult.Columns(2)
SearCHString = TG
'
Set aCell = oRange.Find(What:=SearCHString, LookIn:=xlValues, LookAt:=xlWhole,
SearchOrder:=xlByRows, SearCHDirection:=xlNext, MatchCase:=False,
SearchFormat:=False)
If Not aCell Is Nothing Then
Set bCell = aCell
'FoundAt(1) = aCell.Address
FoundAt = aCell.Row
MsgBox "FoundAt" & FoundAt
MsgBox " Need MCTR Config RBS 6000"
'MsgBox ActiveCell.Row
' Dim wsFindNext As Worksheet
' ' HO Attempts index to matCH
' Set wsFindNext = Worksheets("FindNext")
'wsFindNext.Cells(ii, 1) = FoundAt

'' Check one Dug or Second DUG ???


'

'if second DUG Empty = 0

If TG <> 0 And TG2 <> 0 Then

MsgBox "Dual DUG"


'Site GC2010
'chgr_tg
'RXOTG -8
'RXOTG -8
'RXOTG -187

Else

MsgBox "One DUG"

''Cell A or Cell B or Cell C ( Switch Case ) for Cell.


'Cell A
'MCTR Return Configurations.

If NameC = "A" Then

For xx = 0 To 14
'BSC

wsresult.Range("R" & n + xx) = BSC

'Cell name

wsresult.Range("S" & n + xx) = wsresult.Range("M" & i)


Next xx

'BSPWRB
wsresult.Range("T" & n) = "BSPWRB"
wsresult.Range("U" & n) = BSPWRB

'BSPWRT
wsresult.Range("T" & n + 1) = "BSPWRT"
wsresult.Range("U" & n + 1) = BSPWRT

''MAXTRX(MCTR-0)
wsresult.Range("T" & n + 2) = "MAXTRX(MCTR-0)"
wsresult.Range("U" & n + 2) = BSPWRT

'MAXPWR (MCTR - 0)
wsresult.Range("T" & n + 3) = "MAXPWR(MCTR-0)"
wsresult.Range("U" & n + 3) = BSPWRT
'TRXs (MCTR - 0)
wsresult.Range("T" & n + 4) = "TRXs(MCTR-0)"
wsresult.Range("U" & n + 4) = BSPWRT
'MAXTRX(MCTR 1)
wsresult.Range("T" & n + 5) = "MAXTRX(MCTR-1)"
wsresult.Range("U" & n + 5) = BSPWRT
'MAXPWR (MCTR - 1)
wsresult.Range("T" & n + 6) = "MAXPWR(MCTR-1)"
wsresult.Range("U" & n + 6) = BSPWRT
'TRXs (MCTR - 1)
wsresult.Range("T" & n + 7) = "TRXs(MCTR-1)"
wsresult.Range("U" & n + 7) = BSPWRT
'Active TRXs
wsresult.Range("T" & n + 8) = "Active TRXs"
wsresult.Range("U" & n + 8) = BSPWRT

'num
wsresult.Range("T" & n + 9) = "NUMREQBPC(CHGR-1)"

'numreqbpc(CHGR-1) 16 24

'if condition if value or if NULL ??


'wsresult.Range("U" & n) = NUMREQBPC1 + NUMREQBPC2
wsresult.Range("U" & n + 9) = NUMREQBPC1
'Maio(CHGR-1) 2,4 2,4,6

'maio
wsresult.Range("T" & n + 10) = "Maio(CHGR-1)"
wsresult.Range("U" & n + 10) = MAIO0 & "," & MAIO1 & "," & MAIO2 & "," & MAIO3 &
"," & MAIO4 & "," & MAIO5 & "," & MAIO6

'TRXs(CHGR - 1)

' active TRX 3(1800) 4(1800)


wsresult.Range("T" & n + 11) = "Active TRXs"
'wsresult.Range("U" & n+2) = "Active TRXs"

'DHA OFF ON
wsresult.Range("T" & n + 12) = "DHA"
wsresult.Range("U" & n + 12) = DHA
' DTHAMR 0 100
wsresult.Range("T" & n + 13) = "DTHAMR"
wsresult.Range("U" & n + 13) = DTHAMR
' SDCCH
wsresult.Range("T" & n + 14) = "SDCCH"
wsresult.Range("U" & n + 14) = SDCCH

n = n + 15
End If

If NameC = "B" Then

For xx = 0 To 14
'BSC

wsresult.Range("R" & n + xx) = BSC

'Cell name

wsresult.Range("S" & n + xx) = wsresult.Range("M" & i)

Next xx

'BSPWRB
wsresult.Range("T" & n) = "BSPWRB"
wsresult.Range("U" & n) = BSPWRB

'BSPWRT
wsresult.Range("T" & n + 1) = "BSPWRT"
wsresult.Range("U" & n + 1) = BSPWRT

''MAXTRX(MCTR-0)
wsresult.Range("T" & n + 2) = "MAXTRX(MCTR-2)"
wsresult.Range("U" & n + 2) = BSPWRT

'MAXPWR (MCTR - 0)
wsresult.Range("T" & n + 3) = "MAXPWR(MCTR-2)"
wsresult.Range("U" & n + 3) = BSPWRT
'TRXs (MCTR - 0)
wsresult.Range("T" & n + 4) = "TRXs(MCTR-2)"
wsresult.Range("U" & n + 4) = BSPWRT
'MAXTRX(MCTR 1)
wsresult.Range("T" & n + 5) = "MAXTRX(MCTR-3)"
wsresult.Range("U" & n + 5) = BSPWRT
'MAXPWR (MCTR - 1)
wsresult.Range("T" & n + 6) = "MAXPWR(MCTR-3)"
wsresult.Range("U" & n + 6) = BSPWRT
'TRXs (MCTR - 1)
wsresult.Range("T" & n + 7) = "TRXs(MCTR-3)"
wsresult.Range("U" & n + 7) = BSPWRT
'Active TRXs
wsresult.Range("T" & n + 8) = "Active TRXs"
wsresult.Range("U" & n + 8) = BSPWRT

'num
wsresult.Range("T" & n + 9) = "NUMREQBPC(CHGR-1)"

'numreqbpc(CHGR-1) 16 24

'if condition if value or if NULL ??


'wsresult.Range("U" & n) = NUMREQBPC1 + NUMREQBPC2
wsresult.Range("U" & n + 9) = NUMREQBPC1
'Maio(CHGR-1) 2,4 2,4,6

'maio
wsresult.Range("T" & n + 10) = "Maio(CHGR-1)"
wsresult.Range("U" & n + 10) = MAIO0 & "," & MAIO1 & "," & MAIO2 & "," & MAIO3 &
"," & MAIO4 & "," & MAIO5 & "," & MAIO6

'TRXs(CHGR - 1)

' active TRX 3(1800) 4(1800)


wsresult.Range("T" & n + 11) = "Active TRXs"
'wsresult.Range("U" & n+2) = "Active TRXs"

'DHA OFF ON
wsresult.Range("T" & n + 12) = "DHA"
wsresult.Range("U" & n + 12) = DHA
' DTHAMR 0 100
wsresult.Range("T" & n + 13) = "DTHAMR"
wsresult.Range("U" & n + 13) = DTHAMR
' SDCCH
wsresult.Range("T" & n + 14) = "SDCCH"
wsresult.Range("U" & n + 14) = SDCCH

n = n + 15

End If

If NameC = "C" Then

For xx = 0 To 14
'BSC

wsresult.Range("R" & n + xx) = BSC

'Cell name

wsresult.Range("S" & n + xx) = wsresult.Range("M" & i)

Next xx

'BSPWRB
wsresult.Range("T" & n) = "BSPWRB"
wsresult.Range("U" & n) = BSPWRB

'BSPWRT
wsresult.Range("T" & n + 1) = "BSPWRT"
wsresult.Range("U" & n + 1) = BSPWRT
''MAXTRX(MCTR-0)
wsresult.Range("T" & n + 2) = "MAXTRX(MCTR-4)"
wsresult.Range("U" & n + 2) = BSPWRT

'MAXPWR (MCTR - 0)
wsresult.Range("T" & n + 3) = "MAXPWR(MCTR-4)"
wsresult.Range("U" & n + 3) = BSPWRT
'TRXs (MCTR - 0)
wsresult.Range("T" & n + 4) = "TRXs(MCTR-4)"
wsresult.Range("U" & n + 4) = BSPWRT
'MAXTRX(MCTR 1)
wsresult.Range("T" & n + 5) = "MAXTRX(MCTR-5)"
wsresult.Range("U" & n + 5) = BSPWRT
'MAXPWR (MCTR - 1)
wsresult.Range("T" & n + 6) = "MAXPWR(MCTR-5)"
wsresult.Range("U" & n + 6) = BSPWRT
'TRXs (MCTR - 1)
wsresult.Range("T" & n + 7) = "TRXs(MCTR-5)"
wsresult.Range("U" & n + 7) = BSPWRT
'Active TRXs
wsresult.Range("T" & n + 8) = "Active TRXs"
wsresult.Range("U" & n + 8) = BSPWRT

'num
wsresult.Range("T" & n + 9) = "NUMREQBPC(CHGR-1)"

'numreqbpc(CHGR-1) 16 24

'if condition if value or if NULL ??


'wsresult.Range("U" & n) = NUMREQBPC1 + NUMREQBPC2
wsresult.Range("U" & n + 9) = NUMREQBPC1
'Maio(CHGR-1) 2,4 2,4,6

'maio
wsresult.Range("T" & n + 10) = "Maio(CHGR-1)"
wsresult.Range("U" & n + 10) = MAIO0 & "," & MAIO1 & "," & MAIO2 & "," & MAIO3 &
"," & MAIO4 & "," & MAIO5 & "," & MAIO6

'TRXs(CHGR - 1)

' active TRX 3(1800) 4(1800)


wsresult.Range("T" & n + 11) = "Active TRXs"
'wsresult.Range("U" & n+2) = "Active TRXs"

'DHA OFF ON
wsresult.Range("T" & n + 12) = "DHA"
wsresult.Range("U" & n + 12) = DHA
' DTHAMR 0 100
wsresult.Range("T" & n + 13) = "DTHAMR"
wsresult.Range("U" & n + 13) = DTHAMR
' SDCCH
wsresult.Range("T" & n + 14) = "SDCCH"
wsresult.Range("U" & n + 14) = SDCCH

n = n + 15

End If
End If

Else

MsgBox "RBS 2000 Config "


' BSC
MsgBox "not need MCTR"

'For repeat it 5 Times

wsresult.Range("R" & n) = BSC


wsresult.Range("R" & n + 1) = BSC
wsresult.Range("R" & n + 2) = BSC
wsresult.Range("R" & n + 3) = BSC
wsresult.Range("R" & n + 4) = BSC
wsresult.Range("R" & n + 5) = BSC
'Cell name

wsresult.Range("S" & n) = wsresult.Range("M" & i)


wsresult.Range("S" & n + 1) = wsresult.Range("M" & i)
wsresult.Range("S" & n + 2) = wsresult.Range("M" & i)
wsresult.Range("S" & n + 3) = wsresult.Range("M" & i)
wsresult.Range("S" & n + 4) = wsresult.Range("M" & i)
wsresult.Range("S" & n + 5) = wsresult.Range("M" & i)
'num
wsresult.Range("T" & n) = "NUMREQBPC(CHGR-1)"

'numreqbpc(CHGR-1) 16 24

'if condition if value or if NULL ??


'wsresult.Range("U" & n) = NUMREQBPC1 + NUMREQBPC2
wsresult.Range("U" & n) = NUMREQBPC1
'Maio(CHGR-1) 2,4 2,4,6

'maio
wsresult.Range("T" & n + 1) = "Maio(CHGR-1)"
wsresult.Range("U" & n + 1) = MAIO0 & "," & MAIO1 & "," & MAIO2 & "," & MAIO3 & ","
& MAIO4 & "," & MAIO5 & "," & MAIO6

'TRXs(CHGR - 1)

' active TRX 3(1800) 4(1800)


wsresult.Range("T" & n + 2) = "Active TRXs"
'wsresult.Range("U" & n+2) = "Active TRXs"
'DHA OFF ON
wsresult.Range("T" & n + 3) = "DHA"
wsresult.Range("U" & n + 3) = DHA
' DTHAMR 0 100
wsresult.Range("T" & n + 4) = "DTHAMR"
wsresult.Range("U" & n + 4) = DTHAMR
' SDCCH
wsresult.Range("T" & n + 5) = "SDCCH"
wsresult.Range("U" & n + 5) = SDCCH

n = n + 6

'Start new n to map after theses Values

End If

Next i

'TG =========================
'BLJ CHGR-0
'BOX CHGR-1
'BSL CHGR-2

End Sub

Vous aimerez peut-être aussi