自动过滤器匹配标准,表中的所有数据都是副本

时间:2018-01-04 16:12:52

标签: excel-vba vba excel

只要没有与Autofilter条件匹配的数据,就会复制所有数据。在这种情况下,如何告诉Excel不要复制?

Public Sub autofilter2()

  

PO未收到

GET https://example.com 401 (Please log in.) Failed to load https://example.com No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The response had HTTP status code 401.

  

复制BU +对象

LastRowExploded_JE1 = Sheets("Exploded JE").ListObjects("Exploded_JE").Range.Rows.Count + 5
  

粘贴新数据

Sheets("PO's Not Received").Select
Columns("M:N").EntireColumn.Hidden = False
 ActiveSheet.ListObjects("Table8").Range.AutoFilter Field:=20, Criteria1:= _
    "To Accrue"
lastrow = Sheets("PO's Not Received").ListObjects("Table8").Range.Rows.Count
Range("M2:N" & lastrow).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy

0 个答案:

没有答案