这是我的第一篇文章,我对此感到非常兴奋。如果我的写作没有意义,我提前道歉,因为我不太熟悉编码/编程术语。
这是 我正在使用的Micro_Enabled_Excel_File 。
我有一个包含多列和行的 Excel 文件。行数会随着时间的推移而增加。我正在尝试过滤两列并复制最新/最新的数据点(行)并将其粘贴到新工作表中以创建状态报告。
Excel 数据集:图像
结果会是什么样子:图片
到目前为止我所做的:
Sub First_COPY_STYLE_TO_REPORT()
'creating the Report sheet
Sheets("Report").Select
Cells.Select
Selection.Delete Shift:=xlUp
Sheets("Status Updates").Select
Cells.Select
Selection.Copy
Sheets("Report").Select
ActiveSheet.Paste
Rows("2:1048576").Select
Application.CutCopyMode = False
Selection.ClearContents
End Sub
Run Code Online (Sandbox Code Playgroud)
Sub Second_COPY_UNIQUE_TO_CODE()
'add title to filter columns in the Code sheet
Sheets("Code").Select
Rows("1:1").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Range("A1").Select
ActiveCell.FormulaR1C1 = "Filter1"
Range("B1").Select
ActiveCell.FormulaR1C1 = "Filter2"
'creating the filter criteria also known as scope and trade name …Run Code Online (Sandbox Code Playgroud)