文件名称:N-sheets
-
所属分类:
- 标签属性:
- 上传时间:2013-05-03
-
文件大小:37.38kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
以G列分成多个工作表(以宏运行VBA)
-Sub aa()
Dim a As Integer, b As Integer, c As Integer, sh As Worksheet
For a = 2 To [g65536].End(3).Row
If Cells(a, 7) <> Cells(a- 1, 7) Then
b = a
End If
c = Range("g:g").Find(Cells(a, 7), , , , , xlPrevious).Row
Set sh = Sheets.Add(, Sheets(Sheets.Count))
sh.Name = Sheets("sheet1").Cells(a, 7).Value
With Sheets("Sheet1")
Sheets("Sheet1").Range(.Cells(b, 1), .Cells(c, 10)).Copy Destination:=sh.[a2]
Sheets("Sheet1").Range("a1:j1").Copy Destination:=sh.[a1]
a = c
End With
Sheets("Sheet1").Select
Next
End Sub
-Sub aa()
Dim a As Integer, b As Integer, c As Integer, sh As Worksheet
For a = 2 To [g65536].End(3).Row
If Cells(a, 7) <> Cells(a- 1, 7) Then
b = a
End If
c = Range("g:g").Find(Cells(a, 7), , , , , xlPrevious).Row
Set sh = Sheets.Add(, Sheets(Sheets.Count))
sh.Name = Sheets("sheet1").Cells(a, 7).Value
With Sheets("Sheet1")
Sheets("Sheet1").Range(.Cells(b, 1), .Cells(c, 10)).Copy Destination:=sh.[a2]
Sheets("Sheet1").Range("a1:j1").Copy Destination:=sh.[a1]
a = c
End With
Sheets("Sheet1").Select
Next
End Sub
(系统自动生成,下载前可以参看下载内容)
下载文件列表
N sheets.xls
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.