vba编程常见实例.pdfVIP

  • 180
  • 0
  • 约4.78千字
  • 约 9页
  • 2021-07-02 发布于上海
  • 举报
1、 将 excel 汇总好的表,按字段拆分为多 sheet 的情况:如下图: 代码如下: Sub cfs() Dim GSArr() As String 公司名称清单 Dim Rca As Integer A 列数据行数 Dim i As Integer Dim Sn As String Sn = Rca = Columns(A:A).End(xlDown).Row 按第‘ A 列数据拆分,且第一行无合并单元格 ReDim GSArr(1 To 1) GSArr(1) = Cells(2, 1) For i = 3 To Rca If IsError(Cells(i, 1), GSArr, 0)) Then ReDim Preserve GSArr(1 To UBound(GSArr) + 1) GSArr(UBound(GSArr)) = Cells(i, 1) End If Next If = False Then Rows(1:1).AutoFilter Else If = True Then End If For i = 1 To UBound(GSArr)

文档评论(0)

1亿VIP精品文档

相关文档