vba在sheet1筛选后,将结果复制sheet2中,怎么解决
展开全部
用循环+判断确定筛选数据
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2011-07-02
展开全部
用VBA 很简单的,如果你将表的结构告诉我,我也可以替你写几句,
例如:
先将sheet2 复制到sheet3
假定客户名都在第一列
在sheet3 中运行下面程序(工具——宏——visual basic编辑器)
Sub kk()
Dim ints As Integer
Dim ragc As Range
Dim stofind As String, firadd As String
Dim wors As Worksheet
Application.ScreenUpdating = False
Set wors = Worksheets("sheet1")
For ints = 2 To 1000
stofind = wors.Cells(ints, 1)
Set ragc = ActiveSheet.Range("A2:A800").Find(what:=stofind, lookat:=xlPart)
If Not ragc Is Nothing Then
firadd = ragc.Address
ragc.EntireRow.Select
Selection.Delete Shift:=xlUp
End If
Next ints
Application.ScreenUpdating = True
End Sub
表中剩下的就是不重复的客户
另外,虚机团上产品团购,超级便宜
例如:
先将sheet2 复制到sheet3
假定客户名都在第一列
在sheet3 中运行下面程序(工具——宏——visual basic编辑器)
Sub kk()
Dim ints As Integer
Dim ragc As Range
Dim stofind As String, firadd As String
Dim wors As Worksheet
Application.ScreenUpdating = False
Set wors = Worksheets("sheet1")
For ints = 2 To 1000
stofind = wors.Cells(ints, 1)
Set ragc = ActiveSheet.Range("A2:A800").Find(what:=stofind, lookat:=xlPart)
If Not ragc Is Nothing Then
firadd = ragc.Address
ragc.EntireRow.Select
Selection.Delete Shift:=xlUp
End If
Next ints
Application.ScreenUpdating = True
End Sub
表中剩下的就是不重复的客户
另外,虚机团上产品团购,超级便宜
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询