Hey All,

I need help with creating a macro. The code I have is currently messy and I will clean it up after I solve this but the bare bones of what I want to do is as follows.

selects cell A in sheet A --> go to another sheet B --> filter that sheet for the attribute based on the value inputed in cell A --> Copy all values in sheet B under Column B who shares an attribute in Column A which is filtered by cell A --> Go to Sheet A and copy column B values into sheet A. --> Conditional Formating and Look Pretty

The problem with the code is that when it gets to the part where it has to filter, instead of using the cell A from sheet A as the filter criteria it uses the text I had in cell A sheet A when I initially recorded the macro. I want this macro to be used anytime i change the values in cell A sheet A

PLEASE HELP!

Sub Macro2test()
'
' Macro2test Macro
'

'
    Range("C").Select
    Application.CutCopyMode = False
    Selection.Copy
    Range("F6").Select3
    ActiveSheet.Paste
    Sheets("MAOP Catalog Routes").Select
    ActiveSheet.Range("$A$2:$BR$8444").AutoFilter Field:=1, Criteria1:= _
        "ZTABLE127"
    Range("E2").Select
    Range(Selection, Selection.End(xlDown)).Select
    Range(Selection, Selection.End(xlDown)).Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Making the Macro Work").Select
    Range("F7").Select
    ActiveSheet.Paste
    Range("C4").Select
    Application.CutCopyMode = False
    Selection.Copy
    Range("G6").Select
    ActiveSheet.Paste
    Sheets("Combined Removed Dupicates").Select
    ActiveSheet.Range("$A$1:$E$9219").AutoFilter Field:=2, Criteria1:= _
        "TULLY_200"
    Range("C1").Select
    Range(Selection, Selection.End(xlDown)).Select
    Range(Selection, Selection.End(xlDown)).Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("Making the Macro Work").Select
    Range("G7").Select
    ActiveSheet.Paste
    Range("F8:G500").Select
    Range(Selection, Selection.End(xlDown)).Select
    ActiveWindow.SmallScroll Down:=6
    Range(Selection, Selection.End(xlDown)).Select
    Application.CutCopyMode = False
    Selection.FormatConditions.AddUniqueValues
    Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
    Selection.FormatConditions(1).DupeUnique = xlUnique
    With Selection.FormatConditions(1).Interior
        .PatternColorIndex = xlAutomatic
        .Color = 65535
        .TintAndShade = 0
    End With
    Selection.FormatConditions(1).StopIfTrue = False
End Sub