ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¦p¦ó¨Ï¥Î¥¨¶°¦Û°Ê­pºâªÑ»ùº¦¶^°±»ù?

¦^´_ 3# shuasa
¨S¯d·N¨ì Ceiling ªº¤½¦¡¡G
­×¥¿¦p¤U
  1. Public Function UpDown(ud As Range, Optional UpDn As Boolean = True)
  2.     If ud.Value = 0 Then UpDown = 0: Exit Function
  3.       
  4.     Price_Sample = Array(0, 10, 50, 100, 500, 1000)
  5.     interval_Sample = Array(0.01, 0.05, 0.1, 0.5, 1, 5)
  6.          
  7.     interval = Application.WorksheetFunction.Lookup(ud.Value * IIf(UpDn, 1.1, 0.9), Price_Sample, interval_Sample)
  8.    
  9.     If UpDn Then
  10.         UpDown = Application.WorksheetFunction.Floor(ud.Value * 1.1, interval)
  11.     Else
  12.         UpDown = Application.WorksheetFunction.Ceiling(ud.Value * 0.9, interval)
  13.     End If
  14. End Function
½Æ»s¥N½X

TOP

¦^´_ 7# c_c_lai


     ·PÁ c_c_lai¤j¤j«ü±Ð,·PÁ±z­Ì«üÂI°g¬z
shuasa

TOP

        ÀR«ä¦Û¦b : ®É®É¦n¤ß´N¬O®É®É¦n¤é¡C
ªð¦^¦Cªí ¤W¤@¥DÃD