ªð¦^¦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

¦^´_ 1# JackieKM
.Range(Cells(Pos, 10), Cells(Pos, 20)).FormulaR1C1 = "=RC[-5]-R[-1]C[-5]"
.Range(Cells(Pos, 10), Cells(Pos, 20)) =  .Range(Cells(Pos, 10), Cells(Pos, 20)).Value

TOP

¦^´_ 2# c_c_lai

c_c_lai¤j¤j§A¦n¡AÁÂÁ±zÀ°¦£

    ¦ý§Ú±Nµ{¦¡§ï¬° .Range(Cells(Pos, 10), Cells(Pos, 20)).Value = "=RC[-5]-R[-1]C[-5]"«á¡A
    ±¡ªpÁÙ¬O¤@¼Ë¡AÂI¿ïÀx¦s®æ¡A¸Ì­±¥X²{ªºÁÙ¬O¤½¦¡¡A
    ½Ð®e§Ú¸ÑÄÀ¤@¤U¡A§Ú·Q°µªº¬O¤U­±ªº­pºâ¡A¦ý§Æ±æªº¬O­pºâ«á¥u°O¿ý"­È"´N¦n¡A
    Àx¦s®æA4 - A3¡A±N±o¨ìªº­È°O¿ý¦bH4¡FÀx¦s®æB4 - B3¡A±N±o¨ìªº­È°O¿ý¦bI4, µ¥µ¥.....
    §Æ±æ¤j¤j¯àÀ°¦£«üÂI¡A¦A¦¸·PÁ¡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

¦^´_ 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 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

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

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

TOP

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

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

¥»©«³Ì«á¥Ñ 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

        ÀR«ä¦Û¦b : ­n¥Î¤ß¡A¤£­n¾Þ¤ß¡B·Ð¤ß¡C
ªð¦^¦Cªí ¤W¤@¥DÃD