- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
- Sub Ex()
- Dim ¤âÄò¶O As Integer, N As Integer, B As Single
- Sheets("Sheet1").Select
- Sheets("Sheet1").Names.Add "¤âÄò¶O²v", 0.001425
- Sheets("Sheet1").Names.Add "¥´§é", 0.28
- Sheets("Sheet1").Names.Add "ÃÒ¥æµ|²v", 0.003
- '=========================='½Õ¾ãC°ÏªÑ»ù³W«h
- For Each A In Range("A:A").SpecialCells(xlCellTypeConstants, xlNumbers)
- B = Application.Lookup(A, Array(0, 11, 51, 101, 501, 1001), Array(0.01, 0.05, 0.1, 0.5, 1, 5))
- A(1, "C") = Round(A, 2) * 1000 '¶R¶iªÑª÷
- ¤âÄò¶O = IIf(A(1, "C") * [¤âÄò¶O²v] * [¥´§é] > 20, A(1, "C") * [¤âÄò¶O²v] * [¥´§é], 20)
- A(1, "D") = ¤âÄò¶O '¤âÄò¶O
- A(1, "E") = A(1, "C") + ¤âÄò¶O
- N = 1 '
- A(1, "G") = Round(Round(A, 2) + (B * N), 2) 'C°ÏªÑ»ù
- A(1, "H") = "=RC[-1]*1000" '½æ¥XªÑª÷
- A(1, "I") = "=Round(IF(RC[-1] *¤âÄò¶O²v * ¥´§é > 20, RC[-1] * ¤âÄò¶O²v * ¥´§é, 20), 0)" '½æ¥X¤âÄò¶O
- A(1, "J") = "=Round(RC[-2] *ÃÒ¥æµ|²v,0)" 'ÃÒ¥æµ|
- A(1, "K") = "=RC[-3]-RC[-2]-RC[-1]" '½æ¥Xª÷ÃB
- A(1, "M") = "=RC[-2]-RC[-8]" 'Àò§Qª÷ÃB
- A(1, "N") = "=(RC[-3]-RC[-9])/RC[-9]" 'Àò§Q%¼Æ
- '
- A(1, "N").GoalSeek Goal:=0.01, ChangingCell:=A(1, "G") '***** ¥Ø¼Ð·j´M Àò§Q%¼Æ=0.01 ·|¨D±o±µªñªº[½æ»ù]
- '**** ¤]¥i¥Î°j°é¨D¸Ñ ¨D¸Ñ«áªº[½æ»ù] ·|¬O¯u¹êªº[[ ÀÉ»ù ]] ********
- 'Do Until A(1, "M") >= A(1, "E") * 0.01 ' Àò§Q%¼Æ=0.01
- 'N = N + 1
- 'A(1, "G") = Round(A, 2) + (B * N)
- 'Loop
- '*******************************
- A(1, "G").Resize(, 8) = A(1, "G").Resize(, 8).Value '®ø°£¤½¦¡Åã¥ÜÈ
- Next
- End Sub
½Æ»s¥N½X ¦p¹Ï ½Ðקï Äæ¦ì¦WºÙ
|
|