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

¦p¦ó±N¼Æ¦r180.30§ï¦¨°ê¦r³ü®Ã¹sÂI°Ñ¹s

¥»©«³Ì«á¥Ñ p212 ©ó 2013-12-11 09:20 ½s¿è

¦^´_ 7# ML089
·PÁÂML089 ª©¥D¼ö¤ß¸Ñ»¡TEXT(A1,"[DBNum2]0.00;;")¨Ï¥Î2­Ó¤À¸¹¡A¥i¨ÏÀx¦s®æA1¬°ªÅ®æ®É¹Bºâ¦^À³¬°¡uªÅ¥Õ¡v¡C
¦ý°w¹ïTEXT(A1,"[DBNum2]0.00;;")¤½¦¡¦³¤U¦CºÃ´b¡A·Ð½Ð½ç±Ð¡AÁÂÁ¡I
1¡B¨Ï¥Î2­Ó¤À¸¹ªº TEXT(A1,"[DBNum2]0.00;;")»P¨Ï¥Î1­Ó¤À¸¹ªº TEXT(A1,"[DBNum2]0.00;")¡A¨äµ²ªG¦ü¥G¬O¬Û¦Pªº¡A¹ï§_¡H¨º»ò­Y§ï¥Î1­Ó¤À¸¹·|¦³¦ó¡u¤£¹w´Á¤ÏÀ³¡v¡H
2¡B·íÀx¦s®æA1¬°¡u­t¼Æ¡v®É¡A¤½¦¡TEXT(A1,"[DBNum2]0.00;;")¦^À³ªºµ²ªG±N¬°¡uªÅ¥Õ¡v¡A¦¹À³¦p¦ó­×¥¿¨Ï¨ä¥X²{­t¼Æªºµ²ªG¡H
3¡B¹ï©óTEXT(¼Æ¦r¡A"¥¿;­t;¹s;¤å¦r")¤§"¥¿;­t;¹s;¤å¦r"¡A¦¹³W«h­ì²z¤§¸Ô²Ó»¡©ú¥i©ó¦ó³B¬d¸ß¡H(¦b<<Excel»¡©ú>>¬dµL¦¹³W«h)

TOP

¦^´_  ML089
¦^´_ 7# ML089
·PÁÂML089 ª©¥D¼ö¤ß¸Ñ»¡TEXT(A1,"[DBNum2]0.00;;")¨Ï¥Î2­Ó¤À¸¹¡A¥i¨ÏÀx¦s®æA1¬°ªÅ®æ®É¹Bºâ¦^À³¬°¡uªÅ¥Õ¡v¡C
¦ý°w¹ïTEXT(A1,"[DBNum2]0.00;;")¤½¦¡¦³¤U¦CºÃ´b¡A·Ð½Ð½ç±Ð¡AÁÂÁ¡I
1¡B¨Ï¥Î2­Ó¤À¸¹ªº TEXT(A1,"[DBNum2]0.00;;")»P¨Ï¥Î1­Ó¤À¸¹ªº TEXT(A1,"[DBNum2]0.00;")¡A¨äµ²ªG¦ü¥G¬O¬Û¦Pªº¡A¹ï§_¡H¨º»ò­Y§ï¥Î1­Ó¤À¸¹·|¦³¦ó¡u¤£¹w´Á¤ÏÀ³¡v¡H
2¡B·íÀx¦s®æA1¬°¡u­t¼Æ¡v®É¡A¤½¦¡TEXT(A1,"[DBNum2]0.00;;")¦^À³ªºµ²ªG±N¬°¡uªÅ¥Õ¡v¡A¦¹À³¦p¦ó­×¥¿¨Ï¨ä¥X²{­t¼Æªºµ²ªG¡H
3¡B¹ï©óTEXT(¼Æ¦r¡A"¥¿;­t;¹s;¤å¦r")¤§"¥¿;­t;¹s;¤å¦r"¡A¦¹³W«h­ì²z¤§¸Ô²Ó»¡©ú¥i©ó¦ó³B¬d¸ß¡H(¦b<<Excel»¡©ú>>¬dµL¦¹³W«h)
p212 µoªí©ó 2013-12-11 09:10


°ÝÃD1¡B2½Ð¬Ý¤U­±¹Ï»¡¤º®e
°ÝÃD3¡A§Ú¤£ª¾¹DTEXTªº»¡©ú¥X¦Û­þ¸Ì¡A§Ú³s®Ñ³£¨S¦³¡A¤j³¡¬O¦b½×¾Â¤WÃä¬ÝÃä¾Ç¡A¥[¤W¦Û¤vªº´ú¸Õ´N¹³§ÚPOªº¹Ï¡AÁÙ¦³F1ªº»¡©ú+GOOGLEªº¬d¸ß
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

¦^´_ 10# c_c_lai

¥ÑÅܼƫŧi¤ÎÅܼƩR¦W¨Ó¬Ý¡A§AÀ³¸Ó¬O«Ü±M·~ªºµ{¦¡¤H­û¡C

§Ú¥H«e³£¬O¼gFORTRAN¤pµ{¦¡´N¨S¦³¾i¦¨³o²ßºD¡A¤é«áVBA³¡¤ÀÀ³¸Ó­n¸ò§A¦h¦h¾Ç²ß¡C

³oºØ¤pµ{¦¡¾A¦X§Ú¨Ó½m²ß
Sub ex2()
    Dim strs As String, num As Variant

    strs = ""
    num = 123.4
    strs = strs & num & Chr(10) & NumToCur2(num) & Chr(10)

    num = -456.789
    strs = strs & num & Chr(10) & NumToCur2(num) & Chr(10)
   
    num = 0
    strs = strs & num & Chr(10) & NumToCur2(num) & Chr(10)
   
    num = "123 456 789"
    strs = strs & num & Chr(10) & NumToCur2(num) & Chr(10)
    MsgBox strs

End Sub
Function NumToCur2(ByVal num) As String
    NumToCur2 = num: N = "0123456789.": C = "¹s³ü¶L°Ñ¸v¥î³°¬m®Ã¨hÂI"
    For i = 1 To Len(N)
        NumToCur2 = Replace(NumToCur2, Mid(N, i, 1), Mid(C, i, 1))
    Next
End Function
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

¦^´_ 13# ML089
§Ú¨º NumToCur() ¬O¥Ñ¥H¤Uªº NumToCurr() ­×§ï¦Ó¦¨¡A
©Ò¥H®æ§½¤´«O¯d­ìµ{¦¡­·®æ¡G
  1. ' -----------------------------------------------------------------------------
  2. ' ¹ô­È¤å¼Æ¦rÂà´«
  3. ' ¤Þ­È (num)¡G Âùºë·Ç (Double) ¼Æ­È num as Currency
  4. ' -----------------------------------------------------------------------------
  5. Function NumToCurr(ByVal num) As String
  6.     Const cNum As String = "¹s³ü¶L°Ñ¸v¥î³°¬m®Ã¨h-¸U¥a¨Õ¬B»õ¥a¨Õ¬B¸U¥a¨Õ¬B¤¸¨¤¤À"
  7.     Const cCha As String = "¹s¥a¹s¨Õ¹s¬B¹s¹s¹s¹s¹s»õ¹s¸U¹s¤¸»õ¸U¹s¨¤¹s¤À¹s¾ã-¹s¹s¹s¹s¹s»õ¸U¤¸»õ¹s¾ã¾ã"
  8.     Dim sNum As String
  9.     Dim i As Long
  10.    
  11.     If (num <> 0) And (Abs(num) < 10000000000000#) Then       '  (Abs(num) < 10000000000000#) = True
  12.         sNum = Trim(Str(Int(Abs(num) * 100)))
  13.         For i = 1 To Len(sNum)                ' ³v¦ìÂà´«
  14.             NumToCurr = NumToCurr + Mid(cNum, (Mid(sNum, i, 1)) + 1, 1) + Mid(cNum, 26 - Len(sNum) + i, 1)
  15.         Next
  16.         For i = 0 To 11                       ' ¥h±¼¦h¾lªº¹s
  17.             NumToCurr = Replace(NumToCurr, Mid(cCha, i * 2 + 1, 2), Mid(cCha, i + 26, 1))
  18.         Next
  19.         If num < 0 Then NumToCurr = "(­t)" + NumToCurr
  20.     Else
  21.         NumToCurr = IIf(num = 0, "¹s¤¸", "·¸¥X")
  22.     End If
  23. End Function
½Æ»s¥N½X
¥i¯à³o°¦µ{¦¡½X¹ï§A·|¸û¹ê¥Î¡C

TOP

¦^´_ 14# c_c_lai

§A³o¦Û©w¨ç¼Æ¾A¥Î©ó¤ä²¼ªºª÷ÃB

¼Ó¥DªºÀ³¸Ó¬O ªí³æ¤W¤è¤w¸g¦L¦n ­Ó¤Q¦Ê¤d¸U¡A¤U¤è­n¦L¤J¼Æ¦rÂà¤j¼g¼Æ¦r¡C
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

¦^´_ 1# sasah168


    Æg
§A²q!!

TOP

        ÀR«ä¦Û¦b : ¥¬¬I¦p¼½ºØ¡A¥HÅw³ß¤ß´þ¼íºØ¤l¡A¤~·|µoªÞ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD