




全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Function sjpd() As Boolean If IsNumeric(Cells(4, 2) = False Then MsgBox 请在借款额中输入数字 sjpd = False Exit Function Else If Val(Cells(4, 2) = 0 Then MsgBox 借款金额必须大于零 sjpd = False Exit Function End If End If If IsNumeric(Cells(5, 2) = False Then MsgBox 请在期限中输入整数 sjpd = False Exit Function Else If Val(Cells(5, 2) = 0 Then MsgBox 期限必须大于零 sjpd = False Exit Function End If End If If IsNumeric(Cells(6, 2) = False Then MsgBox 请在利率中输入数字 sjpd = False Exit Function Else If Val(Cells(6, 2) 0 Then Sheet1.ChartObjects.Delete End If Range(B4:B7).ClearContents Range(Cells(4, 2), Cells(6, 2) = 0 Cells(7, 2) = 1 Cells(9, 3) = 0End SubSub jsfx() Dim jzlv As Double Dim bhlv As Double Dim max1 As Double Dim max2 As Double Dim max3 As Double Dim max4 As Double Dim maxx As Double Dim zqs As Integer Dim i As Integer Dim aa As String If sjpd = False Then Exit Sub End If jzlv = Cells(6, 2) bhlv = Cells(9, 2) zqs = Cells(5, 2) * Cells(7, 2) 判断最后一列的字母符号 If zqs = 24 Then aa = Chr(66 + zqs) Else If zqs = 50 Then aa = a & Chr(66 + zqs - 26) Else If zqs = 76 Then aa = b & Chr(66 + zqs - 52) Else If zqs = 102 Then aa = c & Chr(66 + zqs - 78) Else MsgBox (本模型最长还款期数为102期!) End End If End If End If End If 设置表中的期间数 For i = 1 To zqs Cells(12, i + 2) = i Next 设置单元格的对齐方式 Range(Cells(12, 2), Cells(12, zqs + 2).HorizontalAlignment = xlCenter 利用循环语句,计算每期的本金和利息 For i = 1 To zqs Cells(13, i + 2) = =-IPMT(b6/b7, & i & ,b5*b7,b4) Cells(14, i + 2) = =-IPMT(b9/b7, & i & ,b5*b7,b4) Cells(15, i + 2) = =-PPMT(b6/b7, & i & ,b5*b7,b4) Cells(16, i + 2) = =-PPMT(b9/b7, & i & ,b5*b7,b4) Next Range(Cells(13, 3), Cells(16, zqs + 2).NumberFormat = 0.00 max1 = Cells(13, 3) max2 = Cells(14, 3) max3 = Cells(15, zqs + 2) max4 = Cells(16, zqs + 2) maxx = Application.WorksheetFunction.Max(max1, max2, max3, max4) Range(Cells(13, 3), Cells(16, zqs + 2).Select Charts.Add aa = c12: & aa & 16 ActiveChart.ChartType = xlXYScatterSmooth ActiveChart.SetSourceData Source:=Sheets(sheet1).Range(aa), PlotBy:=xlRows ActiveChart.SeriesCollection(1).Name = =基准利率情况下的利息 ActiveChart.SeriesCollection(2).Name = =变化利率情况下的利息 ActiveChart.SeriesCollection(3).Name = =基准利率情况下的本金 ActiveChart.SeriesCollection(4).Name = =变化利率情况下的本金 ActiveChart.Location where:=xlLocationAsObject, Name:=sheet1 With ActiveChart .HasTitle = False .Axes(xlCategory, xlPrimary).HasTitle = True .Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = 期次 .Axes(xlValue, xlPrimary).HasTitle = True .Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = 利息或本金 End With ActiveChart.Axes(xlCategory).Select With ActiveChart.Axes(xlCategory) .MinimumScale = 0 .MaximumScale = zqs + 1 .MinorUnitIsAuto = True .Crosses = xlAutomatic .ReversePlotOrder = False .ScaleType = xlLinear .DisplayUnit = xlNone End With ActiveChart.Axes(xlValue).Select With ActiveChart.Axes(xlValue) .MinimumScale = 0 .MaximumScale = Int(maxx) .MinorUnitIsAuto = True .Crosses = xlAutomatic .ReversePlotOrder = False .ScaleType = xlLinear .DisplayUnit = xlNone End With Selection.TickLabels.NumberFormatLocal = 0 ActiveChart.SeriesCollection(1).Select Selection.Border.ColorIndex = 0 With Selection .MarkerBackgroundColorIndex = 0 .MarkerForegroundColorIndex = 0 .MarkerStyle = xlDiamond End With ActiveChart.SeriesCollection(2).Select Selection.Border.ColorIndex = 1 With Selection .MarkerBackgroundColorIndex = 1 .MarkerForegroundColorIndex = 1 .MarkerStyle = xlSquare End With ActiveChart.SeriesCollection(3).Select Selection.Border.ColorIndex = 3 With Selection .MarkerBackgroundColorIndex = 3 .MarkerForegroundColorIndex = 3 .MarkerStyle = xlTriangle End With ActiveChart.SeriesCollection(4).Select Selection.Border.ColorIndex = 4 With Selection .MarkerBack
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 电机试验考试题目及答案
- 导游考试题集及答案详解
- 年产xx万吨钢结构件项目可行性研究报告(立项申请)
- 大学会展考试题及答案
- 大连保安考试题目及答案
- 检验三严考试试题及答案
- 苹果公司协议书价
- 2025年万辆双向自行车项目可行性研究分析汇报
- 基层干部考试试题及答案
- 火车驾驶考试试题及答案
- 苏州君奥肿瘤医院有限公司介绍企业发展分析报告模板
- 2025-2030中国直升机停机坪监控系统(HMS)行业市场发展趋势与前景展望战略分析研究报告
- 《西湖龙井茶》课件
- 绩效考核方案及指标库
- 全国第三届职业技能大赛(平面设计技术)选拔赛理论考试题库(含答案)
- 发热人员应急处置流程
- 专题14 电磁感应 十年(2015-2024)高考物理真题分类汇编(全国)(解析版)
- EE-华为智能化供应链ISC加变革项目服务化工作指导书-2016
- 江西省上饶市2024-2025学年七年级上册道德与法治期中测试卷(含答案)
- 居民自来水安装合同模板
- 船舶制造技术
评论
0/150
提交评论