Monday, July 18, 2016

Excel 30 76






+

Fonction publique ktDAYS360 (ByVal START_DATE As Date _ ByVal END_DATE As Date _ ByVal Méthode As Integer _ ByVal facultatif Fraction As Boolean = False...) As Variant '[Méthode]' 0: 30/360 (SIA), 1: 30 / 360 (PSA ou BMA), 2: 30/360 (ISDA ou MSRB) '3: 30E / 360, 4: 30E + / 360' yExcelDAYS360ANASD30 / 360 (PSA), [bp30E / 360Z '[Fraction]' False: (DAYS360 [h). Vrai: N 䗦 (YEARFRAC [h) Dim blnLastFeb1 As Boolean Dim blnLastFeb2 As Boolean Dim intYear1 As Integer Dim intYear2 As Integer Dim intMonth1 As Integer Dim intMonth2 As Integer Dim intDay1 As Integer Dim intDay2 As Integer Dim lngDAYS As Long Si (START_DATE END_DATE) Puis ktDAYS360 = CVErr (xlErrValue) Exit Function End If 'Q (ARPj Si (Format (START_DATE + 1,) Alors blnLastFeb2 = True blnLastFeb2 Else If = False End intYear1 = Année (START_DATE) intMonth1 = Mois (START_DATE) intDay1 = Jour (START_DATE) intYear2 = Année (END_DATE) intMonth2 = Mois (END_DATE) intDay2 = Jour (END_DATE) Si (blnLastFeb1 = True) Et (blnLastFeb2 = True) Alors intDay2 = 30 ElseIf (intDay1 = 30) Et (Jour (END_DATE) = 31) Puis intDay2 = 30 End Else If Si (intDay1 = 30) Et (Jour (END_DATE) = 31) Puis intDay2 = 30 Else End If Si (intDay1 = 30) Et (Jour (END_DATE) = 31) Puis intDay2 = 30 Else End If Si (Day (END_DATE) = 31) Puis intDay2 = 30 Else End If Case Else ktDAYS360 = CVErr (xlErrValue) Exit Function End Select '360 * NInteger͈̔z ?? \ long ^ ƃ (ʂLong ^ ɂȂ) lngDAYS = 360 * CLng (intYear2 - intYear1) _ + 30 * (intMonth2 - intMonth1) _ + (intDay2 - intDay1) Si (Fraction = False) Alors ktDAYS360 = lngDAYS Else ktDAYS360 = CDbl (lngDAYS) / 360 # End If End Function -------------------------------------------------- ---------- OOo Basic ̏ꍇ AȉU_̏CKvłB facultatif ByVal Fraction As Boolean = False) As Variant facultatif Fraction ByVal As Boolean) As Variant lngDAYS Dim As Long Si IsMissing (Fraction) Then 'Fraction̏ȗ ߂ lj Fraction = False If End Si (START_DATE Exit Function End If 'Q (ARPj Si (Format (START_DATE + 1,) alors Si (Mois (END_DATE + 1) = 3) Et (Day (END_DATE + 1) = 1) Alors blnLastFeb2 = True Else blnLastFeb2 = False If End Case Else ktDAYS360 = CVErr (xlErrValue) ktDAYS360 = Exit Function End Select OpenOffice. org Calc Google SpreadSheet DAYS360 / YEARFRAC ֐̌ vZ ȉ 悤 ɂȂĂ܂ B `` OpenOffice. org Calc DAYS360 (NASD) cc 30/360 (PSA) YEARFRAC (NASD) cc 30/360 (PSA) YEARFRAC (Loi / Act) cc Ǝ (AFB ߂ H). ڍ ׂ Q `` Google SpreadSheet DAYS360 (US) cc 30/360 (PSA) YEARFRAC (US) cc 30/360 (PSA) YEARFRAC (Loi / Act) cc ISDA ɏ. ڍ ׂ Q `Excel (Office97`2010 Office365)` DAYS360 (NASD) cc 30/360 (PSA) YEARFRAC (NASD) cc Excel97 F 30/360 (SIA) Excel2000ȍ




No comments:

Post a Comment