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

[µo°Ý] ½Ð°ÝFormulaR1C1¸Ó¦p¦ó­×§ï¤~¯à¥u°O¿ý"­È"

[µo°Ý] ½Ð°ÝFormulaR1C1¸Ó¦p¦ó­×§ï¤~¯à¥u°O¿ý"­È"

½Ð±Ð°ª¤â¤j¤j
      ¥H¤U¬O§Úªºµ{¦¡
     .Range(Cells(Pos, 10), Cells(Pos, 20)).FormulaR1C1 = "=RC[-5]-R[-1]C[-5]"
     °õ¦æ«áÀx¦s®æÅã¥Üªº­pºâ«áªº­È¡A¦ýÂI¿ïÀx¦s®æ«o¬O¤½¦¡(¦p=A5-A4)
     ½Ð°Ý§Ú¸Ó¦p¦ó­×¥¿¤~¯àÅýÀx¦s®æ¥u°O¿ý"­È"´N¦n¡A·PÁ¡C

¦^´_ 11# ­ã´£³¡ªL


    ·PÁª©¥Dªº«üÂI¡A¹ê»Ú¹B¥Î¨S°ÝÃD¡A§Ú·Q§Ú¤w±µ¨üExcelªº±J©R¤F¡AÁÂÁ¡C

TOP

¦^´_ 5# JackieKM


­ì¥»ªºÀx¦s®æ¬°¤p¼ÆÂI¨â¦ì¼Æ¡A¦ý¸g¹L¬Û´î«á(°²³]¨âªÌ¬Û´î«á­È¬° 0.1)¡A±o¨ìªºµ²ªG«o¥X²{0.0999999999999801

°Ñ»P­pºâªº¼Æ­È­Y¦³¤p¼ÆÂI, °¸·|µo¥Í[¯BÂI¼Æ]ªºµ²ªG, Àx¦s®æ®æ¦¡Áö³]¬°¤p¼Æ2¦ì, ¬Ý°_¨ÓµL²§ª¬, ¦ý¹ê»Ú¼Æ­È¤w«D­ì»ª,
=0.011-0.01 > µ²ªG:0.000999999999999999
©Ò¥H­n¾i¦¨²ßºD®M¤@¼hROUND¨Ó¶i¦ì, ³o¬OEXCELªº±J©R!

TOP

¥»©«³Ì«á¥Ñ c_c_lai ©ó 2016-7-19 14:26 ½s¿è

¦^´_ 9# JackieKM
·í«Å§i .Range(Cells(Pos, 10), Cells(Pos, 20)).NumberFormatLocal = "#0.00"
¥¦À³¸Ó·|¦Û°Ê±N¸Ó«ü©w¤§ "Àx¦s®æ®æ¦¡" ­×¥¿¬° "¼Æ­È«¬ºA ¤p¼Æ¨â¦ì¡C
»P R1C1 µLÃö¡C

TOP

¦^´_ 6# c_c_lai

c_c_lai¤j¤j§A¦n¡A¦A¦¸ÁÂÁ±z«üÂI¡A

        ²Ä¤@ÂI¬O§Ú¨SÁ¿²M·¡¡A­ì¥»§Ú¤w¦bÀx¦s®æ®æ¦¡¤¤³]©w¬°¤p¼ÆÂI¨â¦ì¼Æ¡AÅã¥Üªºµ²ªG¤]¬O¤p¼ÆÂI¨â¦ì¼Æ¡A
        ¦ýÂI¿ïÀx¦s®æ¡A¬Ý¨ìªºµ²ªG«o¬OÃþ¦ü0.0999999999999801¡A¥[¤JNumberFormatLocal «áÁÙ¬O¤@¼Ë¡A
        ¤§«e¦¹µ{¦¡¨Ï¥ÎFor..Next..®É¨ÃµL¦¹°ÝÃD¡A½Ð°Ý¬O¦]¬°¨Ï¥ÎR1C1ªºÃö«Y¶Ü??  ÁÂÁ¡C

TOP

¦^´_ 7# ­ã´£³¡ªL
¤£¿ùªº³B²z¤è¦¡¡CÁÂÁ«üÂI!

TOP

.FormulaR1C1 = "=ROUND(RC[-5]-R[-1]C[-5],2)"

ÁקK¦³¯BÂI¼Æ, ª½±µ¦b­ì¤½¦¡¥[ROUND¤]¥i!

TOP

¥»©«³Ì«á¥Ñ c_c_lai ©ó 2016-7-19 10:42 ½s¿è

¦^´_ 5# JackieKM
  1. .Range(Cells(Pos, 10), Cells(Pos, 20)).FormulaR1C1 = "=RC[-5]-R[-1]C[-5]"
  2. .Range(Cells(Pos, 10), Cells(Pos, 20)).NumberFormatLocal = "#0.00"
  3. .Range(Cells(Pos, 10), Cells(Pos, 20)) =  .Range(Cells(Pos, 10), Cells(Pos, 20)).Value
½Æ»s¥N½X
©ÎªÌ¬O
  1.     With .Range(Cells(Pos, 10), Cells(Pos, 20))
  2.         .FormulaR1C1 = "=RC[-5]-R[-1]C[-5]"
  3.         .NumberFormatLocal = "#0.00"
  4.         .Value = .Value
  5.     End With
½Æ»s¥N½X

TOP

¦^´_ 4# c_c_lai

c_c_lai¤j¤j§A¦n¡A¦A¦¸ÁÂÁ±z«üÂI¡A

      ¤£¦n·N«ä¡A¬O§Ú»~·|§Aªº·N«ä¤F¡A¸g¹L§ó§ï«á½T©wOK¡A¦ýÁÙ¦³¥H¤U¨âÂI°ÝÃD½Ð±Ð¡A
       1) ­ì¥»ªºÀx¦s®æ¬°¤p¼ÆÂI¨â¦ì¼Æ¡A¦ý¸g¹L¬Û´î«á(°²³]¨âªÌ¬Û´î«á­È¬° 0.1)¡A±o¨ìªºµ²ªG«o¥X²{0.0999999999999801
       2) ¨Ï¥ÎR1C1®É¡AFormulaR1C1¬ö¿ýªº¬°¤½¦¡¡A¤£ª¾¬O§_¦³¨ä¥L¤è¦¡¥i¥Hª½±µ¬ö¿ý"­È"¡A·|³o¼Ë°Ý¬O¦]¬°§Ú·Q²¤Æµ{¦¡¡AÁÂÁ¡C

TOP

¥»©«³Ì«á¥Ñ c_c_lai ©ó 2016-7-19 09:53 ½s¿è

¦^´_ 3# JackieKM
§A·|¿ù·N¤F¡G
  1. .Range(Cells(Pos, 10), Cells(Pos, 20)).FormulaR1C1 = "=RC[-5]-R[-1]C[-5]"
  2. .Range(Cells(Pos, 10), Cells(Pos, 20)) =  .Range(Cells(Pos, 10), Cells(Pos, 20)).Value
½Æ»s¥N½X
³o¨â¦æ¥¦¬O³sÄòªº¡C
´«¥y¸Ü»¡¡A§A­ì¥ýªº
  1. .Range(Cells(Pos, 10), Cells(Pos, 20)).FormulaR1C1 = "=RC[-5]-R[-1]C[-5]"
½Æ»s¥N½X
ªº¤U¤@¦æ¦A´¡¤J
  1. .Range(Cells(Pos, 10), Cells(Pos, 20)) =  .Range(Cells(Pos, 10), Cells(Pos, 20)).Value
½Æ»s¥N½X
´ú¸Õ«Kª¾¡C

TOP

        ÀR«ä¦Û¦b : ¦Y­W¤F­W¡B­WºÉ¤Ü¨Ó¡A¨ÉºÖ¤FºÖ¡BºÖºÉ´d¨Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD