I am wanting to get a report created by using my customer data info in a sheet(customers) that is filtered by selected YEAR(name range "YR") and Month(named range "MN". I have 2 dropdowns for those named ranges so when you select the year and then a month I have a button that execute the macro and copies that data and pastes it for printing in my report sheet. Here is what i have "kinda working" : ( i know its crude basic stuff )
Sub Macro3()
'
' Macro3 Macro
'
'
Sheets("Customers").Select
If (ActiveSheet.AutoFilterMode And ActiveSheet.FilterMode) Or ActiveSheet.FilterMode Then
ActiveSheet.ShowAllData
End If
Range("A2").Select
ActiveSheet.Range("$A$1:$P$2400").AutoFilter Field:=14, Operator:= _
xlFilterValues, Criteria2:=Array(1, "MN/YR")
Selection.End(xlUp).Select
Range("Big_Data").Select
Selection.Copy
Sheets("Reports").Select
Range("A8").Select
ActiveSheet.Paste
Sheets("Customers").Select
If (ActiveSheet.AutoFilterMode And ActiveSheet.FilterMode) Or ActiveSheet.FilterMode Then
ActiveSheet.ShowAllData
End If
Sheets("Reports").Select
End Sub
If I put JAN/20 where the MN/YR is it will report January 2021 data?
Any help would be appreciated.
M
Sub Macro3()
'
' Macro3 Macro
'
'
Sheets("Customers").Select
If (ActiveSheet.AutoFilterMode And ActiveSheet.FilterMode) Or ActiveSheet.FilterMode Then
ActiveSheet.ShowAllData
End If
Range("A2").Select
ActiveSheet.Range("$A$1:$P$2400").AutoFilter Field:=14, Operator:= _
xlFilterValues, Criteria2:=Array(1, "MN/YR")
Selection.End(xlUp).Select
Range("Big_Data").Select
Selection.Copy
Sheets("Reports").Select
Range("A8").Select
ActiveSheet.Paste
Sheets("Customers").Select
If (ActiveSheet.AutoFilterMode And ActiveSheet.FilterMode) Or ActiveSheet.FilterMode Then
ActiveSheet.ShowAllData
End If
Sheets("Reports").Select
End Sub
If I put JAN/20 where the MN/YR is it will report January 2021 data?
Any help would be appreciated.
M