- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¦^´_ 3# shuasa
¨S¯d·N¨ì Ceiling ªº¤½¦¡¡G
×¥¿¦p¤U- Public Function UpDown(ud As Range, Optional UpDn As Boolean = True)
- If ud.Value = 0 Then UpDown = 0: Exit Function
-
- Price_Sample = Array(0, 10, 50, 100, 500, 1000)
- interval_Sample = Array(0.01, 0.05, 0.1, 0.5, 1, 5)
-
- interval = Application.WorksheetFunction.Lookup(ud.Value * IIf(UpDn, 1.1, 0.9), Price_Sample, interval_Sample)
-
- If UpDn Then
- UpDown = Application.WorksheetFunction.Floor(ud.Value * 1.1, interval)
- Else
- UpDown = Application.WorksheetFunction.Ceiling(ud.Value * 0.9, interval)
- End If
- End Function
½Æ»s¥N½X |
|