全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 人教部编版九年级化学上册期末考试及完整答案
- 2022年部编版二年级语文上册期末测试卷(含答案)
- 九年级化学上册期末测试卷(新版)
- 【人教版】八年级化学上册期末测试卷(一套)
- 人教版四年级数学下册期中试卷(必考题)
- 2022-2023年人教版七年级数学下册期中考试题【加答案】
- 2023年人教版地理八年级上册期末试卷(A4打印版)
- 2023年人教版四年级数学下册期中试卷一
- 2023年冀教版八年级生物上册期末测试卷(学生专用)
- 2022年部编人教版九年级数学上册期末试卷(汇编)
- 2024中国东方航空食品投资有限公司校园招聘笔试参考题库含答案解析
- 湖南省长沙雅礼中学2024年高三化学试题试卷含解析
- 市场营销策划(本)-形考任务三(第八~十章)-国开(CQ)-参考资料
- 2023南京中考历史试卷
- 西藏旅游旅行介绍PPT
- 2024-2029全球及中国主数据管理CDS行业市场发展分析及前景趋势与投资发展研究报告
- 水磨钻施工合同
- 《化妆品稳定性试验规范》
- 老年痴呆病的中医护理
- 中空丝杠油冷方案
- 民法典银行培训课件
评论
0/150
提交评论