You are on page 1of 3

Option Explicit

Sub advancedFilterinPlace()

Dim rgdata As Range


Dim rgcriteria As Range
Set rgdata = Worksheets("BOM").Range("A10").CurrentRegion
Set rgcriteria = Worksheets("BOM").Range("A1").CurrentRegion

rgdata.AdvancedFilter xlFilterInPlace, rgcriteria

----------------------------------------------------------------------------------
End Sub

Sub clearfilter()

If Worksheets("BOM").FilterMode = True Then

Worksheets("BOM").ShowAllData

End If

End Sub
-------------------------------------------------------------------------------
Sub advancedFilterincopy()
Dim rg As Range
Dim rgdata As Range
Dim rgcriteria As Range
Dim rgoutput As Range

Set rg = Sheets("ERROR LIST").Range("A1").CurrentRegion

rg.Offset(1, 0).ClearContents

Set rgdata = Worksheets("BOM").Range("A10").CurrentRegion


Set rgcriteria = Worksheets("BOM").Range("A1").CurrentRegion
Set rgoutput = Worksheets("ERROR LIST").Range("A1").CurrentRegion

rgdata.AdvancedFilter xlFilterCopy, rgcriteria, rgoutput

End Sub

-----------------------------------------------------------------------------------
----

Sub Dashboard_Overview()

Dim i As Integer

Rows("3:4").Select
Selection.Delete Shift:=xlUp
Range("A1:B1").Select
Selection.UnMerge

Range( _

"B:B,C:C,D:D,E:E,F:F,G:G,H:H,J:J,K:K,M:M,N:N,O:O,P:P,Q:Q,R:R,S:S,T:T,V:V,W:W,X:X,Y:
Y,Z:Z" _
).Select

Selection.Delete Shift:=xlToLeft

Range("A3").Select

Range("3:3,4:4,5:5,6:6").Select
Range("A6").Activate
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent4
.TintAndShade = 0.799981688894314
.PatternTintAndShade = 0
End With
Range("7:7,8:8,9:9,10:10,11:11,12:12").Select
Range("A12").Activate
With Selection.Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent1
.TintAndShade = 0.799981688894314
.PatternTintAndShade = 0
End With
Range("13:13,14:14,15:15,16:16").Select
Range("A16").Activate
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent2
.TintAndShade = 0.599993896298105
.PatternTintAndShade = 0
End With
ActiveWindow.SmallScroll Down:=3
Range("17:17,18:18,19:19,20:20,21:21").Select
Range("A21").Activate
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent6
.TintAndShade = 0.599993896298105
.PatternTintAndShade = 0
End With
ActiveWindow.SmallScroll Down:=9
Range("17:17,18:18,19:19,20:20,21:21,22:22").Select
Range("A22").Activate
With Selection.Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent6
.TintAndShade = 0.599993896298105
.PatternTintAndShade = 0
End With
Range("23:23,24:24,25:25,26:26").Select
Range("A26").Activate
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark2
.TintAndShade = -0.249977111117893
.PatternTintAndShade = 0
End With

Range("A3").Select

For i = 1 To 26

If Cells(i, 1).Value = "A111" Then


Cells(i, 1).Value = "A111_E1C"
ElseIf Cells(i, 1).Value = "A11U" Then
Cells(i, 1).Value = "A11U_E1C"
ElseIf Cells(i, 1).Value = "A211" Then
Cells(i, 1).Value = "A211_E2A"
ElseIf Cells(i, 1).Value = "A212" Then
Cells(i, 1).Value = "A212_E2A"
ElseIf Cells(i, 1).Value = "A21U" Then
Cells(i, 1).Value = "A21U_E2A"
ElseIf Cells(i, 1).Value = "C111" Then
Cells(i, 1).Value = "C111_W2A"
ElseIf Cells(i, 1).Value = "C11U" Then
Cells(i, 1).Value = "C11U_W2A"
ElseIf Cells(i, 1).Value = "C211" Then
Cells(i, 1).Value = "C111_W2A '"
ElseIf Cells(i, 1).Value = "C212" Then
Cells(i, 1).Value = "C112_W2A '"
ElseIf Cells(i, 1).Value = "C21U" Then
Cells(i, 1).Value = "C11U_W2A '"
ElseIf Cells(i, 1).Value = "C311" Then
Cells(i, 1).Value = "C111_W1C"
ElseIf Cells(i, 1).Value = "C31U" Then
Cells(i, 1).Value = "C112_W1C"

End If
Next

End Sub

You might also like