''''@@@@@@@@@@@@@@@@@@@@@@@@@ IPtime NAS 로그 분석용 ''''@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ '""======================>>====특정 텍스트 색 변경 ======================== Sub WordColor() ''''---------------------------------특정 텍스트만 색상 변경 Dim cell As Range, word As String, startIndex As Integer word = InputBox(Prompt:="단어를 입력하세요", Title:="문자열 색 변환") If Len(word) > 0 Then For Each cell In Selection startIndex = InStr(1, cell, word, vbTextCompare) If startIndex > 0 Then cell.Characters(startIndex, Len(word)).Font.Color = RGB(0, 0, 255) cell.Characters(startIndex, Len(word)).Font.Bold = True End If Next cell End If End Sub ''''@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ '========================================= ================= Sub iptime_공유기_로그분석하기() Range("d2").Select ActiveWindow.FreezePanes = True ''''''''------------틀고정 Range("a2:d50000").Select Selection.Font.Name = "맑은 고딕" Selection.Font.Size = 9 ''''------------------------글자크기 Selection.Font.Color = vbBlack Range("e2:z2").Select Selection.Font.Name = "맑은 고딕" Selection.Font.Size = 10 ''''------------------------글자크기 Range("b1") = "=counta(b2:b50000)" Range("b1:r1").Select Selection.Font.Size = 12 ''''------------------------글자크기 Selection.Interior.Color = vbYellow ''-----------------------배경색 Selection.Font.Bold = True ''''------------------------두껍게 Selection.Font.Color = vbBlue ''''------------------------글자색 Rows("1:1").RowHeight = 20 Rows("2:50000").RowHeight = 11 Range("a:a").ColumnWidth = 4 Range("b:c").ColumnWidth = 10 Range("d:d").ColumnWidth = 130 Range("e:z").ColumnWidth = 7 Dim djco As Range Set djco = Range("b1") Range("e1") = "로그인" Range("f1") = "로그아웃" Range("g1") = "업데이트" Range("h1") = "System" Range("i1") = "잘못" Range("j1") = "접근" Range("k1") = "작성" Range("L1") = "생성" Range("m1") = "변경" Range("n1") = "실패" Range("o1") = "ㅌㅌㅌㅌㅌㅌ" Range("p1") = "삭제" Range("q1") = "내용" Range("r1") = "" Range("s1") = "" Range("t1") = "" Range("e2") = "=IF(ISERROR(FIND(E$1,$d2)),""ㅡ"",E$1)" Range("q2") = "=IF(ISERROR(FIND("".tmp"",$D2)),""File"",""___.tmp"")" Range("e2").Copy Range("e2:p2").Select ActiveSheet.Paste Range("e2:r2").Select Selection.Font.Bold = True ''''------------------------두껍게 Selection.Font.Color = vbRed Selection.Copy Range(Selection, Selection.Offset(djco, 0)).Select ActiveSheet.Paste Application.Run "도형_반영용" End Sub ''''----------------------------------------------------------------------------------------------------------------------------- Sub 정렬_로그순용() ''''---------------------정렬하기 Application.ScreenUpdating = True ActiveSheet.Sort.SortFields.Clear ActiveSheet.Sort.SortFields.Add Key:=Range("e2:e50000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal ActiveSheet.Sort.SortFields.Add Key:=Range("f2:f50000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal ActiveSheet.Sort.SortFields.Add Key:=Range("g2:g50000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal ActiveSheet.Sort.SortFields.Add Key:=Range("h2:h50000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal ActiveSheet.Sort.SortFields.Add Key:=Range("i2:i50000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal ActiveSheet.Sort.SortFields.Add Key:=Range("j2:j50000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal ActiveSheet.Sort.SortFields.Add Key:=Range("k2:k50000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal ActiveSheet.Sort.SortFields.Add Key:=Range("L2:L50000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal ActiveSheet.Sort.SortFields.Add Key:=Range("m2:m50000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal ActiveSheet.Sort.SortFields.Add Key:=Range("n2:n50000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal ActiveSheet.Sort.SortFields.Add Key:=Range("o2:o50000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal ActiveSheet.Sort.SortFields.Add Key:=Range("p2:p50000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal ActiveSheet.Sort.SortFields.Add Key:=Range("q2:q50000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal ActiveSheet.Sort.SortFields.Add Key:=Range("r2:r50000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal ActiveSheet.Sort.SortFields.Add Key:=Range("s2:s50000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal ActiveSheet.Sort.SortFields.Add Key:=Range("t2:t50000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal With ActiveSheet.Sort .SetRange Range("A1:z10000") .Header = xlGuess .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With End Sub Sub 정렬_날짜순용() Range("a2:z50000").Select Selection.Sort Key1:=Range("b1"), Order1:=xlAscending, Key2:=Range("d1"), Order2:=xlDescending, Key3:=Range("c1"), Order3:=xlAscending, Header:= _ xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, DataOption3:=xlSortNormal End Sub Sub 정렬_접근순용() Range("a2:z50000").Select Selection.Sort Key1:=Range("j1"), Order1:=xlAscending, Key2:=Range("k1"), Order2:=xlDescending, Key3:=Range("L1"), Order3:=xlAscending, Header:= _ xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, DataOption3:=xlSortNormal End Sub Sub 정렬_삭제순용() Range("a2:z50000").Select Selection.Sort Key1:=Range("p1"), Order1:=xlAscending, Key2:=Range("q1"), Order2:=xlDescending, Key3:=Range("r1"), Order3:=xlAscending, Header:= _ xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, DataOption3:=xlSortNormal End Sub '''''----------------------------------------------------------------------------------------------------------------------------- Sub 도형_반영용() Dim djrun As Range Set djrun = Range("c1") If djrun = "도형_반영됨" Then Exit Sub End If Application.Run "도형_정렬날순용" Application.Run "도형_정렬접근순용" Application.Run "도형_정렬로그순용" Application.Run "도형_정렬삭제순용" Application.Run "도형_수식반영용" End Sub Sub 도형_정렬날순용() Range("c1") = "도형_반영됨" ActiveSheet.Shapes.AddShape(msoShapeRectangle, 200, 0#, 75, 18).Select Selection.ShapeRange(1).TextFrame2.TextRange.Characters.Text = "날짜순_정렬" Selection.OnAction = "정렬_날짜순용" End Sub Sub 도형_정렬접근순용() Range("c1") = "도형_반영됨" ActiveSheet.Shapes.AddShape(msoShapeRectangle, 300, 0#, 75, 18).Select Selection.ShapeRange(1).TextFrame2.TextRange.Characters.Text = "접근순_정렬" Selection.OnAction = "정렬_접근순용" End Sub Sub 도형_정렬로그순용() Range("c1") = "도형_반영됨" ActiveSheet.Shapes.AddShape(msoShapeRectangle, 400, 0#, 75, 18).Select Selection.ShapeRange(1).TextFrame2.TextRange.Characters.Text = "로그순_정렬" Selection.OnAction = "정렬_로그순용" End Sub Sub 도형_정렬삭제순용() Range("c1") = "도형_반영됨" ActiveSheet.Shapes.AddShape(msoShapeRectangle, 500, 0#, 75, 18).Select Selection.ShapeRange(1).TextFrame2.TextRange.Characters.Text = "삭제순_정렬" Selection.OnAction = "정렬_삭제순용" End Sub Sub 도형_수식반영용() Range("c1") = "도형_반영됨" ActiveSheet.Shapes.AddShape(msoShapeRectangle, 700, 0#, 75, 18).Select Selection.ShapeRange(1).TextFrame2.TextRange.Characters.Text = "수식_반영" Selection.OnAction = "iptime_공유기_로그분석하기" End Sub '''@@@@@@@@@@@@@@@@@@@@@@@@@ IPtime NAS 로그 분석용 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ '