|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
本帖最后由 wudixin96 于 2013-2-18 09:28 编辑
- Range("g2:k100").ClearContents
- Range("g4").Consolidate Sources:=Array( _
- "'单价1'!R15C1:R37C5", "'单价2'!R15C1:R37C5", _
- "'单价9'!R15C1:R37C5", "'单价10'!R15C1:R37C5", _
- "'单价11'!R15C1:R37C5", "'单价12'!R15C1:R37C5", _
- "'单价21'!R15C1:R37C5", "'单价22'!R15C1:R37C5", _
- "'单价13'!R15C1:R37C5", "'单价14'!R15C1:R37C5", _
- "'单价23'!R15C1:R37C5", "'单价24'!R15C1:R37C5", _
- "'单价15'!R15C1:R37C5", "'单价16'!R15C1:R37C5", _
- "'单价25'!R15C1:R37C5", "'单价26'!R15C1:R37C5", _
- "'单价17'!R15C1:R37C5", "'单价18'!R15C1:R37C5", _
- "'单价27'!R15C1:R37C5", "'单价28'!R15C1:R37C5", _
- "'单价19'!R15C1:R37C5", "'单价20'!R15C1:R37C5", _
- "'单价29'!R15C1:R37C5", "'单价30'!R15C1:R37C5", _
- "'单价3'!R15C1:R37C5", "'单价4'!R15C1:R37C5", _
- "'单价5'!R15C1:R37C5", "'单价6'!R15C1:R37C5", _
- "'单价7'!R15C1:R37C5", "'单价8'!R15C1:R37C5", _
- "'单价31'!R15C1:R37C5", "'单价32'!R15C1:R37C5", _
- "'单价33'!R15C1:R37C5", "'单价34'!R15C1:R37C5", _
- "'单价35'!R15C1:R37C5", "'单价36'!R15C1:R37C5", _
- "'单价37'!R15C1:R37C5", "'单价38'!R15C1:R37C5", _
- "'单价41'!R15C1:R37C5", "'单价42'!R15C1:R37C5", _
- "'单价43'!R15C1:R37C5", "'单价44'!R15C1:R37C5", _
- "'单价45'!R15C1:R37C5", "'单价39'!R15C1:R37C5", _
- "'单价40'!R15C1:R37C5"), Function:=xlSum, TopRow:= _
- False, LeftColumn:=True, CreateLinks:=False
-
- Columns("g:k").EntireColumn.Hidden = True
- Columns("A:e").EntireColumn.AutoFit
- Rows("4:54").EntireRow.Hidden = False
- Columns("AE:AJ").EntireColumn.Hidden = True
- For i=4 to 51
- With range("a" & i)
- If .Value = 0 Then
- .EntireRow.Hidden = True
- End If
- End With
- Next
复制代码 中间那段自己改吧,不知道干嘛 |
|