Office中国论坛/Access中国论坛
标题:
请教如何快捷拆分与合并SHEET
[打印本页]
作者:
pureshadow
时间:
2006-7-3 04:42
标题:
请教如何快捷拆分与合并SHEET
请问如何快捷将总表按特定的要求分列成N个SHEET,又如果把这N个SHEET并成一个总表,先谢谢高手了!
至于SHEET怎么分,附件里有了。 [attach]18832[/attach]
结果在四楼
[
本帖最后由 pureshadow 于 2008-8-13 20:48 编辑
]
作者:
pureshadow
时间:
2006-7-3 23:58
解决了哈
作者:
liangest
时间:
2006-7-4 17:16
楼主怎么解决的讲一讲啊
作者:
pureshadow
时间:
2006-7-4 23:31
附件:[attach]18865[/attach]
这是N久以前做的啦,现在看看,不是一般的烂................
稍改一下.
-------------现在的小妖
Sub div()
Dim myrow As Long
Dim mycol As Long
Dim i As Long
myrow = [a65536].End(xlUp).Row
mycol = [iv1].End(xlToLeft).Column
Range("A1:A" & myrow).AdvancedFilter Action:=xlFilterInPlace, Unique:=True
Range("A2:A" & myrow).SpecialCells(xlCellTypeVisible).Copy Destination:=Cells(1, mycol + 1)
ActiveSheet.ShowAllData
Range(Cells(1, 1), Cells(1, mycol)).AutoFilter
For i = 1 To Application.CountA(Columns(mycol + 1))
Sheets.Add
ActiveSheet.Name = Cells(i, mycol + 1)
Range(Cells(1, 1), Cells(1, mycol)).AutoFilter Field:=1, Criteria1:=Cells(i, mycol + 1)
Range(Cells(1, 1), Cells(myrow, mycol)).SpecialCells(xlCellTypeVisible).Copy Destination:=ActiveSheet.Range("a1")
Next
Sheets("sheet1").Select
Range(Cells(1, 1), Cells(1, mycol)).AutoFilter
Columns(mycol + 1).ClearContents
End Sub
也许,过些日子看看,这段,也不是一般的烂
[
本帖最后由 pureshadow 于 2008-7-26 20:45 编辑
]
今天再看,是有点烂……代码写得不够SEXY
[
本帖最后由 pureshadow 于 2010-11-4 20:45 编辑
]
作者:
zhaopin616
时间:
2006-7-6 21:46
楼上的,你作的不具有变通扩展性啊
作者:
pureshadow
时间:
2006-7-6 21:49
[
本帖最后由 pureshadow 于 2008-7-26 20:46 编辑
]
作者:
payangyang0602
时间:
2007-1-17 20:07
111
作者:
shouan
时间:
2008-4-28 16:34
ok
[:34]
作者:
officewps
时间:
2008-4-28 19:14
[:29]
作者:
officewps
时间:
2008-4-28 19:15
[:29]
晕死,不具备扩展性
作者:
officewps
时间:
2008-4-28 19:16
[:29]
晕死,不具备扩展性
作者:
gracher
时间:
2008-5-6 14:39
[:30] 我不会
作者:
esmago
时间:
2008-5-8 15:39
[:34] [:33] [:32] [:31]
作者:
lgcmeli
时间:
2008-5-9 17:21
要看那可能啊看
作者:
klrs
时间:
2008-5-12 13:42
学习一下
作者:
HNNY
时间:
2008-5-18 16:33
小妖又隐藏
作者:
11wolves
时间:
2008-5-29 19:30
学习学习!!!!!!!
作者:
jamienson
时间:
2008-6-1 12:14
标题:
回复 4# 的帖子
[:30]
作者:
sh_xj2000
时间:
2008-6-1 18:34
标题:
学习学习.
[:31]
作者:
gxsylzx
时间:
2008-7-25 16:37
标题:
看看
看看,是否可用
欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/)
Powered by Discuz! X3.3