技術(shù)問題,回答得專家指數(shù),快速升級
-
這個論壇沒有辦法查看發(fā)的帖子的閱讀量嗎 在線,15天前提問
-
微信號綁定錯誤怎么辦 在線,38天前提問
-
這個紙質(zhì)版,怎么買啊 在線,46天前提問
-
聯(lián)通的手機不能訪問論壇,解釋論壇的地址是加拿大地. 在線,64天前提問
-
有沒有做基站覆蓋仿真的軟件? 在線,92天前提問
-
技術(shù)創(chuàng)新與市場策略的調(diào)整,將成為決定企業(yè)能否在全. 在線,95天前提問
-
終端熄屏進入 Idle 態(tài)? 在線,105天前提問
-
有些資料能幫忙找嗎 在線,123天前提問
-
大陸版谷歌打不開,有什么辦法嘛 在線,129天前提問
-
華為GSC高級和網(wǎng)優(yōu)高級有什么區(qū)別 在線,139天前提問
-
請問客服在嗎? 在線,156天前提問
-
信號好,volte通話雜音可能原因 在線,185天前提問
-
有幾個月了。 在線,193天前提問
-
為什么訪問你的論壇老出這個無訪問登 在線,193天前提問
-
怎樣解綁微信? 在線,226天前提問
-
數(shù)通有哪些產(chǎn)品 在線,246天前提問
相關(guān)檢查功能已基本實現(xiàn),相關(guān)代碼如下:
Public CellNames(99999), CellLac(99999), CellCi(99999), CellBCCH(99999), CellBsic(99999), CellTCHSZ(99999), CellFreq(99999)
Public UnFoundSevCell(99999, 0), SameBcchBsic(99999, 0), SameBcch(99999, 0), AdjcBcch(99999, 0), SameTch(99999, 0), AdjcTch(99999, 0), SevCellNames(99999, 0), AdjCellNames(99999, 0)
Public TchMessage(99999, 0), BcchMessage(99999, 0), MessaggeType(99999, 0)
Sub FindSameFreq()
Set FreqBook = ThisWorkbook.Sheets(1)
Set AdjcBook = ThisWorkbook.Sheets(2)
Set CellNamesDic = CreateObject("Scripting.Dictionary")
x = 2
CellOffset = 0
Do
CellNames(CellOffset) = FreqBook.Cells(x, 1)
CellLac(CellOffset) = FreqBook.Cells(x, 3)
CellCi(CellOffset) = FreqBook.Cells(x, 4)
CellBCCH(CellOffset) = FreqBook.Cells(x, 5)
CellBsic(CellOffset) = FreqBook.Cells(x, 6)
FreqTemp = Split(Trim(FreqBook.Cells(x, 7)), " ")
For v = 0 To UBound(FreqTemp)
If CellTCHSZ(CellOffset) = "" And Trim(FreqTemp(v)) <> "" Then
CellTCHSZ(CellOffset) = "[ " & Trim(FreqTemp(v)) & "]"
CellFreq(CellOffset) = Trim(FreqTemp(v))
ElseIf CellTCHSZ(CellOffset) <> "" And Trim(FreqTemp(v)) <> "" Then
CellTCHSZ(CellOffset) = CellTCHSZ(CellOffset) & ",[" & Trim(FreqTemp(v)) & "]" '重新組合頻率
CellFreq(CellOffset) = CellFreq(CellOffset) & ";" & Trim(FreqTemp(v))
End If
Next v
CellNamesDic.Add CellNames(CellOffset), CellOffset
x = x + 1
CellOffset = CellOffset + 1
ct = FreqBook.Cells(x, 1)
Loop Until ct = ""
'==開始運算鄰區(qū)同鄰頻問題
x = 2
UnOff = 0
Do
Sev_CellNames = AdjcBook.Cells(x, 1)
If CellNamesDic.Exists(Sev_CellNames) = True Then
Sev_CellOffTemp = CellNamesDic.Item(Sev_CellNames) '定位主小區(qū)索引號
Adj_CellNames = Split(Trim(AdjcBook.Cells(x, 2)), " ")
For v = 0 To UBound(Adj_CellNames)
If CellNamesDic.Exists(Adj_CellNames(v)) = True Then
Adjc_CellOffTemp = CellNamesDic.Item(Adj_CellNames(v)) '定位鄰區(qū)對應(yīng)索引號
If CellBCCH(Sev_CellOffTemp) = CellBCCH(Adjc_CellOffTemp) And CellBsic(Sev_CellOffTemp) = CellBsic(Adjc_CellOffTemp) Then '同頻同色
BcchMessage(Woff, 0) = CellBCCH(Sev_CellOffTemp) & "(" & CellBsic(Sev_CellOffTemp) & ")"
If MessaggeType(Woff, 0) = "" Then MessaggeType(Woff, 0) = "同頻同色" Else MessaggeType(Woff, 0) = MessaggeType(Woff, 0) & " ,同頻同色"
ElseIf CellBCCH(Sev_CellOffTemp) = CellBCCH(Adjc_CellOffTemp) And CellBsic(Sev_CellOffTemp) <> CellBsic(Adjc_CellOffTemp) Then '同頻不同色
BcchMessage(Woff, 0) = CellBCCH(Sev_CellOffTemp)
If MessaggeType(Woff, 0) = "" Then MessaggeType(Woff, 0) = "同主頻" Else MessaggeType(Woff, 0) = MessaggeType(Woff, 0) & " ,同主頻"
ElseIf CLng(CellBCCH(Sev_CellOffTemp)) + 1 = CLng(CellBCCH(Adjc_CellOffTemp)) Then'鄰主頻+1
BcchMessage(Woff, 0) = CellBCCH(Sev_CellOffTemp) & " vs " & CLng(CellBCCH(Sev_CellOffTemp)) + 1
If MessaggeType(Woff, 0) = "" Then MessaggeType(Woff, 0) = "鄰主頻" Else MessaggeType(Woff, 0) = MessaggeType(Woff, 0) & " ,鄰主頻"
ElseIf CLng(CellBCCH(Sev_CellOffTemp)) - 1 = CLng(CellBCCH(Adjc_CellOffTemp)) Then '鄰主頻-1
BcchMessage(Woff, 0) = CellBCCH(Sev_CellOffTemp) & " vs " & CLng(CellBCCH(Sev_CellOffTemp)) - 1
If MessaggeType(Woff, 0) = "" Then MessaggeType(Woff, 0) = "鄰主頻" Else MessaggeType(Woff, 0) = MessaggeType(Woff, 0) & " ,鄰主頻"
End If
'==============TCH
SCell_Freq = Split(CellFreq(Sev_CellOffTemp), ";")
For Sv = 0 To UBound(SCell_Freq)
FreqCheckTemp = "[" & CLng(SCell_Freq(Sv)) & "]"
If InStr(1, CellTCHSZ(Adjc_CellOffTemp), "[" & CLng(SCell_Freq(Sv)) & "]") > 0 Then '同TCH
If TchMessage(Woff, 0) = "" Then TchMessage(Woff, 0) = SCell_Freq(Sv) Else TchMessage(Woff, 0) = TchMessage(Woff, 0) & " ," & SCell_Freq(Sv)
If MessaggeType(Woff, 0) = "" Then
MessaggeType(Woff, 0) = "同TCH頻"
ElseIf InStr(1, "同TCH頻", MessaggeType(Woff, 0)) > 1 And MessaggeType(Woff, 0) <> "" Then
MessaggeType(Woff, 0) = MessaggeType(Woff, 0) & " ,同TCH頻"
End If
ElseIf (InStr(1, CellTCHSZ(Adjc_CellOffTemp), "[" & CLng(SCell_Freq(Sv)) + 1 & "]") > 0) Then'鄰TCH +
If TchMessage(Woff, 0) = "" Then TchMessage(Woff, 0) = SCell_Freq(Sv) & " vs " & SCell_Freq(Sv) + 1 _
Else TchMessage(Woff, 0) = TchMessage(Woff, 0) & " ," & SCell_Freq(Sv) & " vs " & SCell_Freq(Sv) + 1
If MessaggeType(Woff, 0) = "" Then
MessaggeType(Woff, 0) = "鄰TCH頻"
ElseIf InStr(1, "鄰TCH頻", MessaggeType(Woff, 0)) > 1 And MessaggeType(Woff, 0) <> "" Then
MessaggeType(Woff, 0) = MessaggeType(Woff, 0) & " ,鄰TCH頻"
End If
'If MessaggeType(Woff, 0) = "" Then MessaggeType(Woff, 0) = "鄰TCH頻" Else MessaggeType(Woff, 0) = MessaggeType(Woff, 0) & " ,鄰TCH頻"
ElseIf (InStr(1, CellTCHSZ(Adjc_CellOffTemp), "[" & CLng(SCell_Freq(Sv)) - 1 & "]") > 0) Then'鄰TCH_
If TchMessage(Woff, 0) = "" Then TchMessage(Woff, 0) = SCell_Freq(Sv) & " vs " & SCell_Freq(Sv) - 1 _
Else TchMessage(Woff, 0) = TchMessage(Woff, 0) & " ," & SCell_Freq(Sv) & " vs " & SCell_Freq(Sv) - 1
If MessaggeType(Woff, 0) = "" Then
MessaggeType(Woff, 0) = "鄰TCH頻"
ElseIf InStr(1, "鄰TCH頻", MessaggeType(Woff, 0)) > 1 And MessaggeType(Woff, 0) <> "" Then
MessaggeType(Woff, 0) = MessaggeType(Woff, 0) & " ,鄰TCH頻"
End If
'If MessaggeType(Woff, 0) = "" Then MessaggeType(Woff, 0) = "鄰TCH頻" Else MessaggeType(Woff, 0) = MessaggeType(Woff, 0) & " ,鄰TCH頻"
End If
Next Sv
If BcchMessage(Woff, 0) <> "" Or TchMessage(Woff, 0) <> "" Then ' <> "" Or SameBcchBsic(Woff, 0) <> "" Or SameBcch(Woff, 0) <> "" Or AdjcBcch(Woff, 0) <> "" Then
SevCellNames(Woff, 0) = Sev_CellNames
AdjCellNames(Woff, 0) = Adj_CellNames(v)
Woff = Woff + 1
End If
Else
End If
Next v
ElseIf CellNamesDic.Exists(Sev_CellNames) = False Then
UnFoundSevCell(UnOff, 0) = Sev_CellNames
UnOff = UnOff + 1
End If
x = x + 1
ct = AdjcBook.Cells(x, 1)
Loop Until ct = ""
Set LogBook = ThisWorkbook.Sheets(3)
LogBook.Range("A2:K65535").ClearContents
LogBook.Cells(2, 1).Resize(Woff) = SevCellNames'主小區(qū)
LogBook.Cells(2, 2).Resize(Woff) = AdjCellNames'鄰小區(qū)
LogBook.Cells(2, 3).Resize(Woff) = "Y"
LogBook.Cells(2, 4).Resize(Woff) = ""
LogBook.Cells(2, 5).Resize(Woff) = MessaggeType
LogBook.Cells(2, 6).Resize(Woff) = BcchMessage
LogBook.Cells(2, 7).Resize(Woff) = TchMessage
End Sub
|