


全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Sub zldccmx() Application.ScreenUpdating = False Application.DisplayAlerts = False Sheet2.Activate Range(A2:F5).Select Range(Selection, Selection.End(xlDown).Select Selection.Sort Key1:=Range(A3), Order1:=xlAscending, Key2:=Range(B3) _ , Order2:=xlDescending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _ False, Orientation:=xlTopToBottom, SortMethod:=xlPinYin, DataOption1:= _ xlSortNormal, DataOption2:=xlSortNormal s_s = 1 Set r = Sheet2.Range(a3:a & a65536.End(xlUp).Row) Set dic = CreateObject(scripting.dictionary) For Each c In r If Not dic.exists(c.Value) Then dic.Add c.Value, st_h = Application.Match(c, Range(A3:A2104), 0) + 2 e_h = Application.Match(c, Range(A3:A2104), 1) + 2 sl = e_h - st_h + 1 If s_s = 1 Then On Error Resume Next Sheets.Add: ActiveSheet.Name = 报表 If Err.Number 0 Then ActiveSheet.Delete: Sheets(报表).Cells.Delete: Err.Clear On Error GoTo 0 With Sheets(报表) .Range(.Cells(3, 1), .Cells(3, 18).ColumnWidth = Array(3, 7, 7, 6, 6, 7, 3, 7, 7, 6, 6, 7, 3, 7, 7, 6, 6, 7) .a1:r1.Merge: .a2:b2.Merge: .c2:e2.Merge: .f2:g2.Merge: .h2:j2.Merge: .m2:n2.Merge: .o2:r2.Merge .a1 = 浮动人助金发放花名册: .a2 = 班级:: .f2 = 人数:: .m2 = 合计金额: .a1.Font.Size = 24 .a3:f3 = Array(序号, 姓名, 月份, 月标准, 金额, 签名) .g3:l3.Value = .a3:f3.Value: .m3:r3.Value = .a3:f3.Value: .Cells.HorizontalAlignment = xlCenter hhh = Round(sl 3 + 0.9999) .Cells(2, 3) = c.Value .Cells(2, 8) = sl & 人 .Cells(2, 15) = =sum(F4:F & hhh + 4 - 1 & ,M & 4 & :M & hhh + 4 - 1 & ,T & 4 & :T & hhh + 4 - 1 & ) For j = 1 To hhh .Range(.Cells(j + 3, 1), .Cells(j + 3, 5).Value = Sheets(数据).Range(Cells(st_h + j - 1, 2), Cells(st_h + j - 1, 6).Value .Range(.Cells(j + 3, 7), .Cells(j + 3, 11).Value = Sheets(数据).Range(Cells(st_h + j - 1 + hhh, 2), Cells(st_h + j - 1 + hhh, 6).Value .Range(.Cells(j + 3, 13), .Cells(j + 3, 17).Value = IIf(st_h + j + 2 * hhh = e_h, Sheets(数据).Range(Cells(st_h + j - 1 + 2 * hhh, 2), Cells(st_h + j - 1 + 2 * hhh, 6).Value, ) Next j .Range(.Cells(3, 1), .Cells(hhh + 3, 18).Borders.LineStyle = xlContinuous .Cells(hhh + 4, 4) = 制表人:: .Cells(hhh + 4, 13) = 审核人(班主任): .Cells(hhh + 4, 15) = Application.VLookup(.C2.Value, Sheets(班主任名单).Range(A:B), 2, 0) End With s_s = 2 Else With Sheets(报表) endrow = .d65536.End(xlUp).Row + 1 .Rows(1:3).Copy .Rows(endrow).Insert shift:=xlDown .Rows(endrow).PageBreak = xlPageBreakManual hhh = Round(sl 3 + 0.9999) .Cells(endrow + 1, 3) = c.Value .Cells(endrow + 1, 8) = sl & 人 .Cells(endrow + 1, 15) = =sum(F & endrow + 3 & :F & endrow + hhh + 3 - 1 & ,M & endrow + 3 & :M & endrow + hhh + 3 - 1 & ,T & endrow + 3 & :T & endrow + hhh + 3 - 1 & ) For j = 1 To hhh .Range(.Cells(j + endrow + 2, 1), .Cells(j + endrow + 2, 5).Value = Sheets(数据).Range(Cells(st_h + j - 1, 2), Cells(st_h + j - 1, 6).Value .Range(.Cells(j + endrow + 2, 7), .Cells(j + endrow + 2, 11).Value = Sheets(数据).Range(Cells(st_h + j - 1 + hhh, 2), Cells(st_h + j - 1 + hhh, 6).Value .Range(.Cells(j + endrow + 2, 13), .Cells(j + endrow + 2, 17).Value = IIf(st_h + j + 2 * hhh = e_h, Sheets(数据).Range(Cells(st_h + j - 1 + 2 * hhh, 2), Cells(st_h + j - 1 + 2 * hhh, 6).Value, ) Next j .Range(.Cells(endrow + 2, 1), .Cells(hhh + 2 + endrow, 18).Borders.LineStyle = xlContinuous .Cells(hhh + 3 + endrow, 4) = 制表人:: .Cells(hhh + endrow + 3, 13) = 审核人(班主任): .Cells(hhh + 3 + endrow, 15) = Application.VLookup(.Cells(endrow + 1, 3).Value, Sheets(班主任名单).Range
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 社区发展新质生产力的实践模式
- 新质生产力覆盖的十四大行业
- 2025年骨科手术并发症处理技巧考核答案及解析
- 2025年心血管疾病影像学检查模拟考试答案及解析
- 2025年神经病学病例分析与诊断能力测试卷答案及解析
- 2025年心血管内科危重病例急救应急演练答案及解析
- 2025年眼科常见疾病临床诊疗考核试卷答案及解析
- 2025年康复医学评估与康复方案设计考试卷答案及解析
- 2025年神经科学综合知识测试模拟试卷答案及解析
- 2025年放射肿瘤科治疗方案设计案例答案及解析
- 超市服务礼仪培训课件
- 购物中心策划培训课件
- 增生性肌炎的超声表现
- 供应商黑名单管理制度
- 我国新一代人工智能创新发展行动计划
- 2025-2030年中国吉林汽车零部件产业发展分析及投资前景调研报告
- 曲靖高级技工学校学生管理手册与实际操作指南
- 2025-2030曲线显示设备行业市场现状供需分析及投资评估规划分析研究报告
- jsa在安全生产管理中的应用
- GB 4789.42-2025食品安全国家标准食品微生物学检验诺如病毒检验
- 思想道德与法治2023年版教材资料全集
评论
0/150
提交评论