求美剧哥谭第一季小丑市小丑第一季资源 百度云

查看: 2361|回复: 3
运行时显示下标越界是什么意思,请高手帮助改正一下
阅读权限20
在线时间 小时
Sub Macro1()
Dim i&, j&, k&, m&, n&
i = Sheets(&尺供复制&).Cells(1, 8).Value&&'初始值
j = Sheets(&尺供复制&).Cells(2, 8).Value&&'间隔
k = Sheets(&尺供复制&).Cells(3, 8).Value&&'长度
Do While i + k - 1 - j & 10000
&&Sheets(&Sheet3&).Select
& & Cells.Select
& & Selection.Copy
& & Sheets(&主文&).Select
& & Cells.Select
& & ActiveSheet.Paste
For n = 1 To 12
Sheets(&数据供提取&).Activate
Sheets(&数据供提取&).Range(Cells(i, 3), Cells(i + k - 1, 4)).Copy
&&Sheets(&主文&).Activate
& &Cells(1, m + 32).Select
& & ActiveSheet.Paste
Range(Cells(1, m + 32), Cells(k, m + 33)).Sort Cells(1, m + 32), xlAscending
Range(Cells(1, m + 32), Cells(k, m + 33)).Copy
Cells(1, m + 23).Select
ActiveSheet.Paste
Range(Cells(1, m), Cells(k, m + 22)).Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
& && &&&:=False, Transpose:=False
Range(Cells(1, m), Cells(k, m + 24)).Select
Range(Cells(1, m), Cells(k, m + 24)).Sort Cells(1, m + 24), xlAscending
Range(Cells(1, m), Cells(k, m + 25)).Select
Range(Cells(1, m), Cells(k, m + 25)).Sort Cells(1, m + 23), xlAscending
Cells(1, m + 26).Select
ActiveCell.FormulaR1C1 = &-1&
Cells(2, m + 26).Select
ActiveCell.FormulaR1C1 = &=R[-1]C[-3]-RC[-3]&
Selection.AutoFill Destination:=Range(Cells(2, m + 26), Cells(k, m + 26))
Range(Cells(2, m + 26), Cells(k, m + 26)).Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
& && &&&:=False, Transpose:=False
Cells(1, m + 27).Select
ActiveCell.FormulaR1C1 = &=COUNTIF(R1C[-4]:RC[-4],LARGE(R1C[-4]:RC[-4],1))&
Selection.AutoFill Destination:=Range(Cells(1, m + 27), Cells(k, m + 27))
Range(Cells(1, m + 27), Cells(k, m + 27)).Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
& && &&&:=False, Transpose:=False
Range(Cells(1, m), Cells(k, m + 27)).Select
Range(Cells(1, m), Cells(k, m + 27)).Sort Cells(1, m + 24), xlAscending
Range(Cells(1, m), Cells(k, m + 27)).Sort Cells(1, m + 27), xlAscending
Cells(1, m + 28).Select
ActiveCell.FormulaR1C1 = &-1&
Cells(2, m + 28).Select
ActiveCell.FormulaR1C1 = &=R[-1]C[-1]-RC[-1]&
Selection.AutoFill Destination:=Range(Cells(2, m + 28), Cells(k, m + 28))
Range(Cells(2, m + 28), Cells(k, m + 28)).Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
& && &&&:=False, Transpose:=False
Range(Cells(1, m), Cells(k, m + 28)).Select
Range(Cells(1, m), Cells(k, m + 28)).Sort Cells(1, m + 24), xlAscending
Range(Cells(1, m), Cells(k, m + 28)).Sort Cells(1, m + 28), xlAscending
Cells(2, m + 29).Select
ActiveCell.FormulaR1C1 = &=RC[-5]-R[-1]C[-5]&
Selection.AutoFill Destination:=Range(Cells(2, m + 29), Cells(k, m + 29))
Range(Cells(2, m + 29), Cells(k, m + 29)).Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
& && &&&:=False, Transpose:=False
Cells(2, m + 30).Select
ActiveCell.FormulaR1C1 = &=IF(RC[-1]&0,&&&&,IF(SMALL(R2C[-1]:RC[-1],1)&0,&&&&,RC[-1]))&
Selection.AutoFill Destination:=Range(Cells(2, m + 30), Cells(k, m + 30))
& &Range(Cells(2, m + 30), Cells(k, m + 30)).Select
& & Selection.Copy
& & Cells(2, m + 29).Select
& & Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
& && &&&:=False, Transpose:=False
& & Range(Cells(2, m + 30), Cells(k, m + 30)).Select
& & Application.CutCopyMode = False
& & Selection.ClearContents
& &Range(Cells(1, m), Cells(k, m + 29)).Select
Range(Cells(1, m), Cells(k, m + 29)).Sort Cells(1, m + 24), xlAscending
Range(Cells(1, m), Cells(k, m + 29)).Sort Cells(1, m + 27), xlAscending
Range(Cells(1, m + 32), Cells(k, m + 33)).Select
Range(Cells(1, m + 32), Cells(k, m + 33)).Sort Cells(1, m + 33), xlAscending
m = m + 37
i = i + 12 * j
Columns(&NG:NG&).Select
& & Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
& & Sheets(&尺供复制&).Select
& & Columns(&J:J&).Select
& & Selection.Copy
& & Sheets(&主文&).Select
& & ActiveSheet.Paste
& & Range(&C1&).Select
& & Range(&C1:QC700&).Select
& & Application.CutCopyMode = False
& & With Selection.Font
& && &&&.Name = &华文仿宋&
& && &&&.Strikethrough = False
& && &&&.Superscript = False
& && &&&.Subscript = False
& && &&&.OutlineFont = False
& && &&&.Shadow = False
& && &&&.Underline = xlUnderlineStyleNone
& && &&&.TintAndShade = 0
& && &&&.ThemeFont = xlThemeFontNone
& & End With
& & With Selection.Font
& && &&&.Name = &华文仿宋&
& && &&&.Size = 11
& && &&&.Strikethrough = False
& && &&&.Superscript = False
& && &&&.Subscript = False
& && &&&.OutlineFont = False
& && &&&.Shadow = False
& && &&&.Underline = xlUnderlineStyleNone
& && &&&.TintAndShade = 0
& && &&&.ThemeFont = xlThemeFontNone
& & End With
& & Selection.ColumnWidth = 4.2
& & Selection.RowHeight = 12.5
& & With Selection
& && &&&.HorizontalAlignment = xlLeft
& && &&&.VerticalAlignment = xlCenter
& && &&&.WrapText = False
& && &&&.Orientation = 0
& && &&&.AddIndent = False
& && &&&.ShrinkToFit = False
& && &&&.ReadingOrder = xlContext
& && &&&.MergeCells = False
& & End With
& & Range(&C1&).Select
& & Range(&C1:QC700&).Select
& & Selection.Borders(xlDiagonalDown).LineStyle = xlNone
& & Selection.Borders(xlDiagonalUp).LineStyle = xlNone
& & With Selection.Borders(xlEdgeLeft)
& && &&&.LineStyle = xlContinuous
& && &&&.ColorIndex = 0
& && &&&.TintAndShade = 0
& && &&&.Weight = xlThin
& & End With
& & With Selection.Borders(xlEdgeTop)
& && &&&.LineStyle = xlContinuous
& && &&&.ColorIndex = 0
& && &&&.TintAndShade = 0
& && &&&.Weight = xlThin
& & End With
& & With Selection.Borders(xlEdgeBottom)
& && &&&.LineStyle = xlContinuous
& && &&&.ColorIndex = 0
& && &&&.TintAndShade = 0
& && &&&.Weight = xlThin
& & End With
& & With Selection.Borders(xlEdgeRight)
& && &&&.LineStyle = xlContinuous
& && &&&.ColorIndex = 0
& && &&&.TintAndShade = 0
& && &&&.Weight = xlThin
& & End With
& & With Selection.Borders(xlInsideVertical)
& && &&&.LineStyle = xlContinuous
& && &&&.ColorIndex = 0
& && &&&.TintAndShade = 0
& && &&&.Weight = xlThin
& & End With
& & With Selection.Borders(xlInsideHorizontal)
& && &&&.LineStyle = xlContinuous
& && &&&.ColorIndex = 0
& && &&&.TintAndShade = 0
& && &&&.Weight = xlThin
& & End With
& & ActiveWindow.Zoom = 100
& & Range(&A1&).Select
& & Application.DisplayAlerts = False
Dim SH As Worksheet
Dim Str As String
For Each SH In ThisWorkbook.Worksheets
& &&&Str = SH.Name
& &&&If Str = &主文& Then
& && && &SH.Copy
& && && &With ActiveWorkbook
& && && && & .SaveAs ThisWorkbook.Path & &\& & Sheets(&尺供复制&).Cells(5, 8) & & & & &12& & & & & Sheets(&主文&).Cells(1, 36) & &-& & Sheets(&主文&).Cells(1, 444) & &young job start each& & Sheets(&尺供复制&).Cells(2, 8) & &.xlsx&
& && && && & .Close
& && && &End With
& &&&End If
& && &&&Application.DisplayAlerts = True
& && &&&Loop
阅读权限100
在线时间 小时
两个问题:
1. 既然楼主只将“主文”这个工作表复制到新的工作簿中,没有必要使用 For Each 循环;
2. 根据楼主的代码,则请楼主告诉我们,
ThisWorkbook.Path & &\& & Sheets(&尺供复制&).Cells(5, 8) & & & & &12& & & & & Sheets(&主文&).Cells(1, 36) & &-& & Sheets(&主文&).Cells(1, 444) & &young job start each& & Sheets(&尺供复制&).Cells(2, 8) & &.xlsx&
执行后得到的文件名称是什么呢?这句代码中所谓的 “尺供复制”是这个新工作簿中的吗?(理论上应该不是)。如果不是,必须明确指明是从哪一个工作簿中引用过来的。
阅读权限100
在线时间 小时
& & & & & & & &
估计这里的 Sheets(&尺供复制&) 和 Sheets(&主文&) 是从当前代码所在的工作簿中来的,所以,建议楼主将这句代码改成如下代码试试看:
With ActiveWorkbook
& && && && & .SaveAs ThisWorkbook.Path & &\& & ThisWorkbook.Sheets(&尺供复制&).Cells(5, 8) & & & & &12& & & & & ThisWorkbook.Sheets(&主文&).Cells(1, 36) & &-& & ThisWorkbook.Sheets(&主文&).Cells(1, 444) & &young job start each& & ThisWorkbook.Sheets(&尺供复制&).Cells(2, 8) & &.xlsx&
& && && && & .Close
由于复制的是 Sheets(&主文&) 工作表到新的工作簿,所以,Sheets(&主文&) 可以从当前新工作簿引用,代码还可以更改如下:
With ActiveWorkbook
& && && && & .SaveAs ThisWorkbook.Path & &\& & ThisWorkbook.Sheets(&尺供复制&).Cells(5, 8) & & & & &12& & & & & .Sheets(&主文&).Cells(1, 36) & &-& & .Sheets(&主文&).Cells(1, 444) & &young job start each& & ThisWorkbook.Sheets(&尺供复制&).Cells(2, 8) & &.xlsx&
& && && && & .Close
这里的 “ThisWorkbook.” 意思与上例相同,而“.” 则说明这里的 Sheets(&主文&) 是当前 ActiveWorkbook 中的工作表(主要是因为使用了 With ActiveWorkbook 语句)。
阅读权限20
在线时间 小时
在运行到最长的一行时,SaveAs ThisWorkbook.Path & &\& & Sheets(&尺供复制&).Cells(5, 8) & & & & &12& & & & & Sheets(&主文&).Cells(1, 36) & &-& & Sheets(&主文&).Cells(1, 444) & &young job start each& & Sheets(&尺供复制&).Cells(2, 8) & &.xlsx&这个地方出的问题
最新热点 /1
ExcelHome每周都有线上直播公开课,
国内一流讲师真身分享,高手贴身答疑,
赶不上直播还能看录像,
关键居然是免费的!
厚木哥们都已经这么努力了,
你还好意思说学不好Office。
玩命加载中,请稍候
玩命加载中,请稍候
Powered by
本论坛言论纯属发表者个人意见,任何违反国家相关法律的言论,本站将协助国家相关部门追究发言者责任! & & 本站特聘法律顾问:徐怀玉律师 李志群律师扫二维码下载作业帮
1.75亿学生的选择
下载作业帮安装包
扫二维码下载作业帮
1.75亿学生的选择
一道C语言题目,哪位高手帮我看看下面一道题要选哪个,(45)若有以下定义和语句:int w[2][3],(*pw)[3]; pw=w;则对w数组元素非法引用是( )A)*(w[0]+2) =*w[0][2] B)*(pw+1)[2] C)pw[0][0] =*w[0][0] D)*(pw[1]+2) =*w[1][2]
扫二维码下载作业帮
1.75亿学生的选择
A 赋值号左边的*(w[0]+2) 就是w[0][2],正确,但是赋值号左边的w[0][2]为元素,不能再次反引用,错误B *(pw+1)[2]在前面赋值pw=w;后,注意[]运算符级别高于*,因此就是w[3][0],语法正确,但是下标越界了,有逻辑错误C 赋值号左边的pw[0][0]就是w[0][0],正确,但是赋值号右边的*w[0][0]错误,原因参见AD 赋值号左边的*(pw[1]+2) 就是w[1][2],正确,但是赋值号右边的*w[1][2]错误,原因同上综上所述,没有一个答案是正确的,唯一语法没错的答案有逻辑错误不清楚你的题目是否有误
为您推荐:
其他类似问题
扫描下载二维码问题补充&&
本页链接:
并不是完善的!只要从官网上下载他的一个补丁安装了就OK了,金蝶系统和操作系统一样!很简单的一个问题一看就是菜鸟级别人物i
•••••••••••
还可以通过“服务预约”与我们的服务工程师取得联系:http:完整的问题描述应包括产品.com/GxA感谢您对金蝶公司的支持尊敬的客户://kdweibo,欢迎您体验
Give crowns and pounds and guineasBut not your heart away
热心网友&1-05 10:18
猜你感兴趣查看: 2323|回复: 2
excel启用宏时显示下标越界,请高手帮我看下,谢谢!
阅读权限10
在线时间 小时
Sub 分类()Dim i1 As Long
Dim i2 As Long
Dim i3 As Long
Dim i4 As Long
Dim i5 As Long
Dim i6 As Long
Dim i7 As Long
Dim i11 As Long
Dim i22 As Long
Dim i33 As Long
Dim i44 As Long
Dim i55 As Long
Dim i66 As Long
Dim i77 As Long
Dim n As Long
i1 = 4& &'现金表开始明细数据行次
i2 = 4& &'银-建行表开始明细数据行次
i3 = 4& &'工行表开始明细数据行次
i4 = 4& &'建行表开始明细数据行次
i5 = 4& &'农行表开始明细数据行次
i6 = 4& &'交行表开始明细数据行次
i7 = 4& &'民生行表开始明细数据行次
n = 3& & '收入明细数据开始行次
Application.Worksheets(&现金&).Range(&A& & i1 & &:G2000&).ClearContents
Application.Worksheets(&银-建行&).Range(&A& & i2 & &:G2000&).ClearContents
Application.Worksheets(&工行&).Range(&A& & i3 & &:G2000&).ClearContents
Application.Worksheets(&建行&).Range(&A& & i4 & &:G2000&).ClearContents
Application.Worksheets(&农行&).Range(&A& & i5 & &:G2000&).ClearContents
Application.Worksheets(&交行&).Range(&A& & i6 & &:G2000&).ClearContents
Application.Worksheets(&民生行&).Range(&A& & i7 & &:G2000&).ClearContents
While Application.Worksheets(&收入&).Cells(n, 2) && &&
& & If Application.Worksheets(&收入&).Cells(n, 2) = &现金& Then
& && &&&Application.Worksheets(&现金&).Cells(i1, 1) = Application.Worksheets(&收入&).Cells(n, 1)
& && &&&Application.Worksheets(&现金&).Cells(i1, 2) = Application.Worksheets(&收入&).Cells(n, 2)
& && &&&Application.Worksheets(&现金&).Cells(i1, 3) = Application.Worksheets(&收入&).Cells(n, 3)
& && &&&Application.Worksheets(&现金&).Cells(i1, 4) = Application.Worksheets(&收入&).Cells(n, 4)
& && &&&Application.Worksheets(&现金&).Cells(i1, 5) = Application.Worksheets(&收入&).Cells(n, 5)
& && &&&Application.Worksheets(&现金&).Cells(i1, 6) = Application.Worksheets(&收入&).Cells(n, 6)
& && &&&Application.Worksheets(&现金&).Cells(i1, 7) = Application.Worksheets(&收入&).Cells(n, 7)
& && &&&Application.Worksheets(&现金&).Cells(i1, 8) = Application.Worksheets(&收入&).Cells(n, 25)
& && &&&Application.Worksheets(&现金&).Cells(i1, 9).FormulaR1C1 = &=R[-1]C+RC[-2]-RC[-1]&
& && &&&i1 = i1 + 1
& & End If
& & If Application.Worksheets(&收入&).Cells(n, 2) = &银-建行& Then
& && &&&Application.Worksheets(&银-建行&).Cells(i2, 1) = Application.Worksheets(&收入&).Cells(n, 1)
& && &&&Application.Worksheets(&银-建行&).Cells(i2, 2) = Application.Worksheets(&收入&).Cells(n, 2)
& && &&&Application.Worksheets(&银-建行&).Cells(i2, 3) = Application.Worksheets(&收入&).Cells(n, 3)
& && &&&Application.Worksheets(&银-建行&).Cells(i2, 4) = Application.Worksheets(&收入&).Cells(n, 4)
& && &&&Application.Worksheets(&银-建行&).Cells(i2, 5) = Application.Worksheets(&收入&).Cells(n, 5)
& && &&&Application.Worksheets(&银-建行&).Cells(i2, 6) = Application.Worksheets(&收入&).Cells(n, 6)
& && &&&Application.Worksheets(&银-建行&).Cells(i2, 7) = Application.Worksheets(&收入&).Cells(n, 7)
& && &&&Application.Worksheets(&银-建行&).Cells(i2, 8) = Application.Worksheets(&收入&).Cells(n, 26)
& && &&&Application.Worksheets(&银-建行&).Cells(i2, 9).FormulaR1C1 = &=R[-1]C+RC[-2]-RC[-1]&
& && &&&i2 = i2 + 1
& & End If
& & If Application.Worksheets(&收入&).Cells(n, 2) = &工行& Then
& && &&&Application.Worksheets(&工行&).Cells(i3, 1) = Application.Worksheets(&收入&).Cells(n, 1)
& && &&&Application.Worksheets(&工行&).Cells(i3, 2) = Application.Worksheets(&收入&).Cells(n, 2)
& && &&&Application.Worksheets(&工行&).Cells(i3, 3) = Application.Worksheets(&收入&).Cells(n, 3)
& && &&&Application.Worksheets(&工行&).Cells(i3, 4) = Application.Worksheets(&收入&).Cells(n, 4)
& && &&&Application.Worksheets(&工行&).Cells(i3, 5) = Application.Worksheets(&收入&).Cells(n, 5)
& && &&&Application.Worksheets(&工行&).Cells(i3, 6) = Application.Worksheets(&收入&).Cells(n, 6)
& && &&&Application.Worksheets(&工行&).Cells(i3, 7) = Application.Worksheets(&收入&).Cells(n, 7)
& && &&&Application.Worksheets(&工行&).Cells(i3, 8) = Application.Worksheets(&收入&).Cells(n, 27)
& && &&&Application.Worksheets(&工行&).Cells(i3, 9).FormulaR1C1 = &=R[-1]C+RC[-2]-RC[-1]&
& && &&&i3 = i3 + 1
& & End If
& & If Application.Worksheets(&收入&).Cells(n, 2) = &建行& Then
& && &&&Application.Worksheets(&建行&).Cells(i4, 1) = Application.Worksheets(&收入&).Cells(n, 1)
& && &&&Application.Worksheets(&建行&).Cells(i4, 2) = Application.Worksheets(&收入&).Cells(n, 2)
& && &&&Application.Worksheets(&建行&).Cells(i4, 3) = Application.Worksheets(&收入&).Cells(n, 3)
& && &&&Application.Worksheets(&建行&).Cells(i4, 4) = Application.Worksheets(&收入&).Cells(n, 4)
& && &&&Application.Worksheets(&建行&).Cells(i4, 5) = Application.Worksheets(&收入&).Cells(n, 5)
& && &&&Application.Worksheets(&建行&).Cells(i4, 6) = Application.Worksheets(&收入&).Cells(n, 6)
& && &&&Application.Worksheets(&建行&).Cells(i4, 7) = Application.Worksheets(&收入&).Cells(n, 7)
& && &&&Application.Worksheets(&建行&).Cells(i4, 8) = Application.Worksheets(&收入&).Cells(n, 28)
& && &&&Application.Worksheets(&建行&).Cells(i4, 9).FormulaR1C1 = &=R[-1]C+RC[-2]-RC[-1]&
& && &&&i4 = i4 + 1
& & End If
& &If Application.Worksheets(&收入&).Cells(n, 2) = &农行& Then
& && &&&Application.Worksheets(&农行&).Cells(i5, 1) = Application.Worksheets(&收入&).Cells(n, 1)
& && &&&Application.Worksheets(&农行&).Cells(i5, 2) = Application.Worksheets(&收入&).Cells(n, 2)
& && &&&Application.Worksheets(&农行&).Cells(i5, 3) = Application.Worksheets(&收入&).Cells(n, 3)
& && &&&Application.Worksheets(&农行&).Cells(i5, 4) = Application.Worksheets(&收入&).Cells(n, 4)
& && &&&Application.Worksheets(&农行&).Cells(i5, 5) = Application.Worksheets(&收入&).Cells(n, 5)
& && &&&Application.Worksheets(&农行&).Cells(i5, 6) = Application.Worksheets(&收入&).Cells(n, 6)
& && &&&Application.Worksheets(&农行&).Cells(i5, 7) = Application.Worksheets(&收入&).Cells(n, 7)
& && &&&Application.Worksheets(&农行&).Cells(i5, 8) = Application.Worksheets(&收入&).Cells(n, 29)
& && &&&Application.Worksheets(&农行&).Cells(i5, 9).FormulaR1C1 = &=R[-1]C+RC[-2]-RC[-1]&
& && &&&i5 = i5 + 1
& & End If
& & If Application.Worksheets(&收入&).Cells(n, 2) = &交行& Then
& && &&&Application.Worksheets(&交行&).Cells(i6, 1) = Application.Worksheets(&收入&).Cells(n, 1)
& && &&&Application.Worksheets(&交行&).Cells(i6, 2) = Application.Worksheets(&收入&).Cells(n, 2)
& && &&&Application.Worksheets(&交行&).Cells(i6, 3) = Application.Worksheets(&收入&).Cells(n, 3)
& && &&&Application.Worksheets(&交行&).Cells(i6, 4) = Application.Worksheets(&收入&).Cells(n, 4)
& && &&&Application.Worksheets(&交行&).Cells(i6, 5) = Application.Worksheets(&收入&).Cells(n, 5)
& && &&&Application.Worksheets(&交行&).Cells(i6, 6) = Application.Worksheets(&收入&).Cells(n, 6)
& && &&&Application.Worksheets(&交行&).Cells(i6, 7) = Application.Worksheets(&收入&).Cells(n, 7)
& && &&&Application.Worksheets(&交行&).Cells(i6, 8) = Application.Worksheets(&收入&).Cells(n, 30)
& && &&&Application.Worksheets(&交行&).Cells(i6, 9).FormulaR1C1 = &=R[-1]C+RC[-2]-RC[-1]&
& && &&&i6 = i6 + 1
& & End If
& & If Application.Worksheets(&收入&).Cells(n, 2) = &民生行& Then
& && &&&Application.Worksheets(&民生行&).Cells(i7, 1) = Application.Worksheets(&收入&).Cells(n, 1)
& && &&&Application.Worksheets(&民生行&).Cells(i7, 2) = Application.Worksheets(&收入&).Cells(n, 2)
& && &&&Application.Worksheets(&民生行&).Cells(i7, 3) = Application.Worksheets(&收入&).Cells(n, 3)
& && &&&Application.Worksheets(&民生行&).Cells(i7, 4) = Application.Worksheets(&收入&).Cells(n, 4)
& && &&&Application.Worksheets(&民生行&).Cells(i7, 5) = Application.Worksheets(&收入&).Cells(n, 5)
& && &&&Application.Worksheets(&民生行&).Cells(i7, 6) = Application.Worksheets(&收入&).Cells(n, 6)
& && &&&Application.Worksheets(&民生行&).Cells(i7, 7) = Application.Worksheets(&收入&).Cells(n, 7)
& && &&&Application.Worksheets(&民生行&).Cells(i7, 8) = Application.Worksheets(&收入&).Cells(n, 31)
& && &&&Application.Worksheets(&民生行&).Cells(i7, 9).FormulaR1C1 = &=R[-1]C+RC[-2]-RC[-1]&
& && &&&i7 = i7 + 1
& & End If
& &&&n = n + 1
(77.41 KB, 下载次数: 0)
16:23 上传
(22.47 KB, 下载次数: 0)
16:23 上传
(28.54 KB, 下载次数: 0)
16:22 上传
阅读权限10
在线时间 小时
n = 3& & '支出明细数据开始行次
While Application.Worksheets(&支出&).Cells(n, 2) && &&
& & If Application.Worksheets(&支出&).Cells(n, 2) = &现金& Then
& && &&&Application.Worksheets(&现金&).Cells(i1, 1) = Application.Worksheets(&支出&).Cells(n, 1)
& && &&&Application.Worksheets(&现金&).Cells(i1, 2) = Application.Worksheets(&支出&).Cells(n, 2)
& && &&&Application.Worksheets(&现金&).Cells(i1, 3) = Application.Worksheets(&支出&).Cells(n, 3)
& && &&&Application.Worksheets(&现金&).Cells(i1, 4) = Application.Worksheets(&支出&).Cells(n, 4)
& && &&&Application.Worksheets(&现金&).Cells(i1, 5) = Application.Worksheets(&支出&).Cells(n, 5)
& && && &Application.Worksheets(&现金&).Cells(i1, 6) = Application.Worksheets(&支出&).Cells(n, 6)
& && &&&Application.Worksheets(&现金&).Cells(i1, 7) = Application.Worksheets(&支出&).Cells(n, 7)
& && &&&Application.Worksheets(&现金&).Cells(i1, 9) = Application.Worksheets(&支出&).Cells(n, 40)
& && &&&Application.Worksheets(&现金&).Cells(i1, 10).FormulaR1C1 = &=R[-1]C+RC[-2]-RC[-1]&
& && &&&i1 = i1 + 1
& & End If
& & If Application.Worksheets(&支出&).Cells(n, 2) = &银-建行& Then
& && &&&Application.Worksheets(&银-建行&).Cells(i2, 1) = Application.Worksheets(&支出&).Cells(n, 1)
& && &&&Application.Worksheets(&银-建行&).Cells(i2, 2) = Application.Worksheets(&支出&).Cells(n, 2)
& && &&&Application.Worksheets(&银-建行&).Cells(i2, 3) = Application.Worksheets(&支出&).Cells(n, 3)
& && &&&Application.Worksheets(&银-建行&).Cells(i2, 4) = Application.Worksheets(&支出&).Cells(n, 4)
& && &&&Application.Worksheets(&银-建行&).Cells(i2, 5) = Application.Worksheets(&支出&).Cells(n, 5)
& && &&&Application.Worksheets(&银-建行&).Cells(i2, 6) = Application.Worksheets(&支出&).Cells(n, 6)
& && &&&Application.Worksheets(&银-建行&).Cells(i2, 7) = Application.Worksheets(&支出&).Cells(n, 7)
& && &&&Application.Worksheets(&银-建行&).Cells(i2, 9) = Application.Worksheets(&支出&).Cells(n, 41)
& && &&&Application.Worksheets(&银-建行&).Cells(i2, 10).FormulaR1C1 = &=R[-1]C+RC[-2]-RC[-1]&
& && &&&i2 = i2 + 1
& & End If
& & If Application.Worksheets(&支出&).Cells(n, 2) = &工行& Then
& && &&&Application.Worksheets(&工行&).Cells(i3, 1) = Application.Worksheets(&支出&).Cells(n, 1)
& && &&&Application.Worksheets(&工行&).Cells(i3, 2) = Application.Worksheets(&支出&).Cells(n, 2)
& && &&&Application.Worksheets(&工行&).Cells(i3, 3) = Application.Worksheets(&支出&).Cells(n, 3)
& && &&&Application.Worksheets(&工行&).Cells(i3, 4) = Application.Worksheets(&支出&).Cells(n, 4)
& && &&&Application.Worksheets(&工行&).Cells(i3, 5) = Application.Worksheets(&支出&).Cells(n, 5)
& && &&&Application.Worksheets(&工行&).Cells(i3, 6) = Application.Worksheets(&支出&).Cells(n, 6)
& && &&&Application.Worksheets(&工行&).Cells(i3, 7) = Application.Worksheets(&支出&).Cells(n, 7)
& && &&&Application.Worksheets(&工行&).Cells(i3, 9) = Application.Worksheets(&支出&).Cells(n, 42)
& && &&&Application.Worksheets(&工行&).Cells(i3, 10).FormulaR1C1 = &=R[-1]C+RC[-2]-RC[-1]&
& && &&&i3 = i3 + 1
& & End If
& & If Application.Worksheets(&支出&).Cells(n, 2) = &建行& Then
& && &&&Application.Worksheets(&建行&).Cells(i4, 1) = Application.Worksheets(&支出&).Cells(n, 1)
& && &&&Application.Worksheets(&建行&).Cells(i4, 2) = Application.Worksheets(&支出&).Cells(n, 2)
& && &&&Application.Worksheets(&建行&).Cells(i4, 3) = Application.Worksheets(&支出&).Cells(n, 3)
& && &&&Application.Worksheets(&建行&).Cells(i4, 4) = Application.Worksheets(&支出&).Cells(n, 4)
& && &&&Application.Worksheets(&建行&).Cells(i4, 5) = Application.Worksheets(&支出&).Cells(n, 5)
& && &&&Application.Worksheets(&建行&).Cells(i4, 6) = Application.Worksheets(&支出&).Cells(n, 6)
& && &&&Application.Worksheets(&建行&).Cells(i4, 7) = Application.Worksheets(&支出&).Cells(n, 7)
& && &&&Application.Worksheets(&建行&).Cells(i4, 9) = Application.Worksheets(&支出&).Cells(n, 43)
& && &&&Application.Worksheets(&建行&).Cells(i4, 10).FormulaR1C1 = &=R[-1]C+RC[-2]-RC[-1]&
& && &&&i4 = i4 + 1
& & End If
& & If Application.Worksheets(&支出&).Cells(n, 2) = &农行& Then
& && &&&Application.Worksheets(&农行&).Cells(i5, 1) = Application.Worksheets(&支出&).Cells(n, 1)
& && &&&Application.Worksheets(&农行&).Cells(i5, 2) = Application.Worksheets(&支出&).Cells(n, 2)
& && &&&Application.Worksheets(&农行&).Cells(i5, 3) = Application.Worksheets(&支出&).Cells(n, 3)
& && &&&Application.Worksheets(&农行&).Cells(i5, 4) = Application.Worksheets(&支出&).Cells(n, 4)
& && &&&Application.Worksheets(&农行&).Cells(i5, 5) = Application.Worksheets(&支出&).Cells(n, 5)
& && &&&Application.Worksheets(&农行&).Cells(i5, 6) = Application.Worksheets(&支出&).Cells(n, 6)
& && &&&Application.Worksheets(&农行&).Cells(i5, 7) = Application.Worksheets(&支出&).Cells(n, 7)
& && &&&Application.Worksheets(&农行&).Cells(i5, 9) = Application.Worksheets(&支出&).Cells(n, 44)
& && &&&Application.Worksheets(&农行&).Cells(i5, 10).FormulaR1C1 = &=R[-1]C+RC[-2]-RC[-1]&
& && &&&i5 = i5 + 1
& & End If
& &&&If Application.Worksheets(&支出&).Cells(n, 2) = &交行& Then
& && &&&Application.Worksheets(&交行&).Cells(i6, 1) = Application.Worksheets(&支出&).Cells(n, 1)
& && &&&Application.Worksheets(&交行&).Cells(i6, 2) = Application.Worksheets(&支出&).Cells(n, 2)
& && &&&Application.Worksheets(&交行&).Cells(i6, 3) = Application.Worksheets(&支出&).Cells(n, 3)
& && &&&Application.Worksheets(&交行&).Cells(i6, 4) = Application.Worksheets(&支出&).Cells(n, 4)
& && &&&Application.Worksheets(&交行&).Cells(i6, 5) = Application.Worksheets(&支出&).Cells(n, 5)
& && &&&Application.Worksheets(&交行&).Cells(i6, 6) = Application.Worksheets(&支出&).Cells(n, 6)
& && &&&Application.Worksheets(&交行&).Cells(i6, 7) = Application.Worksheets(&支出&).Cells(n, 7)
& && &&&Application.Worksheets(&交行&).Cells(i6, 9) = Application.Worksheets(&支出&).Cells(n, 45)
& && &&&Application.Worksheets(&交行&).Cells(i6, 10).FormulaR1C1 = &=R[-1]C+RC[-2]-RC[-1]&
& && &&&i6 = i6 + 1
& & End If
& &&&If Application.Worksheets(&支出&).Cells(n, 2) = &民生行& Then
& && &&&Application.Worksheets(&民生行&).Cells(i7, 1) = Application.Worksheets(&支出&).Cells(n, 1)
& && &&&Application.Worksheets(&民生行&).Cells(i7, 2) = Application.Worksheets(&支出&).Cells(n, 2)
& && &&&Application.Worksheets(&民生行&).Cells(i7, 3) = Application.Worksheets(&支出&).Cells(n, 3)
& && &&&Application.Worksheets(&民生行&).Cells(i7, 4) = Application.Worksheets(&支出&).Cells(n, 4)
& && &&&Application.Worksheets(&民生行&).Cells(i7, 5) = Application.Worksheets(&支出&).Cells(n, 5)
& && &&&Application.Worksheets(&民生行&).Cells(i7, 6) = Application.Worksheets(&支出&).Cells(n, 5)
& && &&&Application.Worksheets(&民生行&).Cells(i7, 7) = Application.Worksheets(&支出&).Cells(n, 6)
& && &&&Application.Worksheets(&民生行&).Cells(i7, 9) = Application.Worksheets(&支出&).Cells(n, 46)
& && &&&Application.Worksheets(&民生行&).Cells(i7, 10).FormulaR1C1 = &=R[-1]C+RC[-2]-RC[-1]&
& && &&&i7 = i7 + 1
& & End If
& &&&n = n + 1
& & Application.Worksheets(&现金&).Range(&A& & i11 & &:H& & (i1 - 1)).Sort Key1:=Application.Worksheets(&现金&).Range(&A3&), Order1:=xlAscending, Header:=xlNo, _
& && &&&OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, SortMethod _
& && &&&:=xlPinYin, DataOption1:=xlSortNormal
& & Application.Worksheets(&银-建行&).Range(&A& & i22 & &:H& & (i2 - 1)).Sort Key1:=Application.Worksheets(&银-建行&).Range(&A3&), Order1:=xlAscending, Header:=xlNo, _
& && &&&OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, SortMethod _
& && &&&:=xlPinYin, DataOption1:=xlSortNormal
& & Application.Worksheets(&工行&).Range(&A& & i33 & &:H& & (i3 - 1)).Sort Key1:=Application.Worksheets(&工行&).Range(&A3&), Order1:=xlAscending, Header:=xlNo, _
& && &&&OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, SortMethod _
& && &&&:=xlPinYin, DataOption1:=xlSortNormal
& &&&Application.Worksheets(&建行&).Range(&A& & i44 & &:H& & (i4 - 1)).Sort Key1:=Application.Worksheets(&建行&).Range(&A3&), Order1:=xlAscending, Header:=xlNo, _
& && &&&OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, SortMethod _
& && &&&:=xlPinYin, DataOption1:=xlSortNormal
& & Application.Worksheets(&农行&).Range(&A& & i55 & &:H& & (i5 - 1)).Sort Key1:=Application.Worksheets(&农行&).Range(&A3&), Order1:=xlAscending, Header:=xlNo, _
& && &&&OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, SortMethod _
& && &&&:=xlPinYin, DataOption1:=xlSortNormal& &
& & Application.Worksheets(&交行&).Range(&A& & i66 & &:H& & (i6 - 1)).Sort Key1:=Application.Worksheets(&交行&).Range(&A3&), Order1:=xlAscending, Header:=xlNo, _
& && &&&OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, SortMethod _
& && &&&:=xlPinYin, DataOption1:=xlSortNormal& &&&
& & Application.Worksheets(&民生行&).Range(&A& & i77 & &:H& & (i7 - 1)).Sort Key1:=Application.Worksheets(&民生行&).Range(&A3&), Order1:=xlAscending, Header:=xlNo, _
& && &&&OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, SortMethod _
& && &&&:=xlPinYin, DataOption1:=xlSortNormal
& && && &End Sub
阅读权限100
在线时间 小时
仔细检查一个“交行”工作表是否存在?
最新热点 /1
ExcelHome每周都有线上直播公开课,
国内一流讲师真身分享,高手贴身答疑,
赶不上直播还能看录像,
关键居然是免费的!
厚木哥们都已经这么努力了,
你还好意思说学不好Office。
玩命加载中,请稍候
玩命加载中,请稍候
Powered by
本论坛言论纯属发表者个人意见,任何违反国家相关法律的言论,本站将协助国家相关部门追究发言者责任! & & 本站特聘法律顾问:徐怀玉律师 李志群律师

我要回帖

更多关于 美剧哥谭小丑 的文章

 

随机推荐