Hey all!
I am a macro/vba noob in these parts. Some of my work colleagues have been trying to figure out a macro that will allow us to move down to the next row and capture the data successfully. Right now, we are manual changing the range/criteria1 row by row. How could we configure this to automatically go to the next row of data?
Edit: I attached the workbook. the macro tab, in H3 is our wanted output. However as you can see in the MacroEquation tab and the actual macro, we are manually changing the cirteria1 from sheet CMS NY 2016 column A. How could we modify this marco to reproduce our output in h3 for all of the remaining rows? instead of hacing to change for each row/criteria?
Windows("FY16CMSMetrics.xlsx").Activate
Range("A2:A2261").Select
Range("A2261").Activate
ActiveCell.FormulaR1C1 = "360084"
Windows("FY16MedicareImpactMetricsMACRO.xlsm").Activate
ActiveSheet.Range("$A$1:$Z$3448").AutoFilter Field:=1, Criteria1:="360084"
Range("C2260:X2260").Select
Selection.Copy
Sheets("Macro Equation").Select
Range("B6").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Range("D3").Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.Copy
Range("E3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("G3").Select
End Sub
Bookmarks