全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 汽车内饰塑料件加工制作工作手册
- 拍卖业务流程与法规遵守手册
- 木材包装材料制作与承重设计手册
- 城市绿化生态修复实施手册 (标准版)
- 网店转让合同模板电商店铺买卖协议范本二篇
- 期末测试(试题)-三年级数学上册人教版
- 2025年洪湖职业学院单招综合素质考试题库【典优】附答案详解
- 2026年黑龙江农垦职业学院高职单招职业技能考试题库(夺冠)附答案详解
- 2024年新疆伊犁河谷职业学院高职单招职业技能考试题库附参考答案详解【B卷】
- 2024年承德应用技术大学专科单招综合素质考试题库及参考答案详解【培优A卷】
- 成都交易集团有限公司 2026年第二批社会集中公开招聘的笔试参考试题及答案详解
- 2026江苏泰州市姜堰区罗塘街道招聘公益性岗位工作人员18人笔试参考试题及答案详解
- 电力安全知识宣传
- 2025年事业单位新闻类岗真题及答案解析
- 《数字孪生城市研究报告(2026年)》
- 法人a证试题及答案
- 物资编码基础知识
- 2026版新公司法精解
- 人教九年级上册前三单元化学测试题
- 廉政家访工作制度
- 七十岁驾照换证“三力测试”题库(含答案及解析)
评论
0/150
提交评论