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

[µo°Ý] «¬ºA¤£²Å¦X ?½Ð±Ð­n¦p¦ó­×¥¿?

[µo°Ý] «¬ºA¤£²Å¦X ?½Ð±Ð­n¦p¦ó­×¥¿?

bb = 70
Sheets("¦ÛÀç§ë«H").Range("c3:c" & bb) = Round(Sheets("sheet2").Range("k3:k" & bb).Value / 1000, 0)
K column ªº½d³ò¨C®æ°£ 1000 copy ¨ì c column
«¬ºA¤£²Å¦X ?½Ð±Ð­n¦p¦ó­×¥¿?

¦^´_ 1# t8899
¥H¤U¾Ç²ß¤è®×½Ð«e½ú°Ñ¦Ò
Sub TEST()
bb = 70
With Sheets("¦ÛÀç§ë«H").Range("c3:c" & bb)
   .Value = "=ROUND(sheet2!K3/1000,0)"
   .Value = .Value
End With
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¥»©«³Ì«á¥Ñ t8899 ©ó 2024-3-14 09:48 ½s¿è
¦^´_  t8899
¥H¤U¾Ç²ß¤è®×½Ð«e½ú°Ñ¦Ò
Sub TEST()
bb = 70
With Sheets("¦ÛÀç§ë«H").Range("c3:c" & bb ...
Andy2483 µoªí©ó 2024-3-14 09:19

kÄ檺70­ÓÀx¦s®æªº­È³£¬O¤£¤@¼Ëªº¡A³o¼Ë¥u¦³«þ¦³K3ªº­È ??k4 ,k5, k6 ............................??
K3/1000 ---->c3
k4/1000------c4
.
.
.
.
¤£·Q¥Îfor next ªº»yªk

TOP

¦^´_ 3# t8899
.Value = "=ROUND(sheet2!K3/1000,0)"
Andy¤j´£¨Ñ¨Ï¥Î¤½¦¡¤è¦¡À³¸Ó¬O¥i¥H¸Ñ¨M§A¤£¥Î´`Àôªº°ÝÃD...
½T©wµ²ªG¤£²Å´Á±æ¶Ü??

TOP

¥»©«³Ì«á¥Ñ t8899 ©ó 2024-3-14 12:15 ½s¿è
¦^´_  t8899
.Value = "=ROUND(sheet2!K3/1000,0)"
Andy¤j´£¨Ñ¨Ï¥Î¤½¦¡¤è¦¡À³¸Ó¬O¥i¥H¸Ñ¨M§A¤£¥Î´`Àôªº ...
shuo1125 µoªí©ó 2024-3-14 10:11

Sheets("¦ÛÀç§ë«H").Range("c3:c" & bb) = Evaluate("round(Sheet2!k3:k" & bb & "/1000,0)")
³o¬O³Ì²³æ¤S§ó§Öªº¤èªk (¤@¦æ(¥y)´N¸Ñ¨M)
§Ú¦b¨ä¥Lªº½×ôάݨ쪺¡A´£¨Ñ¤j®a°Ñ¦Ò
Evaluate ¥i¨ú¥N°}¦C ubound «Ü¤Ö¤H¦b¥Î??

TOP

¦^´_ 5# t8899

ÁÂÁ«e½ú«ü±Ð,¥H¤U¤èªk¤]½Ð°Ñ¦Ò
[¦ÛÀç§ë«H!C3].Resize(70) = "=ROUND(sheet2!K3/1000,0)"
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¦^´_ 6# Andy2483
¦^´_ 5# t8899
¥uª¾¹DEVALUATE¦n¹³¸ò[ ]¦³Ãö..
¨ü±Ð¤F~·PÁ¨â¦ì!

TOP

¥»©«³Ì«á¥Ñ Andy2483 ©ó 2024-3-14 13:54 ½s¿è

¦^´_ 7# shuo1125

Evaluate¤èªk«Ü¹ê¥Î,¥i¬O±`±`·|§Ñ¤F¥Î
https://learn.microsoft.com/zh-t ... pplication.evaluate

¥H¤U½×¾Â³sµ²©« ½Ð°Ñ¦Ò
https://forum.twbts.com/viewthre ... amp;page=3#pid54150
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¦^´_ 8# Andy2483
Andy¤jÁ`¬O¤£§[¤À¨É¤Î«ü¾É....
·PÁ§A¤F~

TOP

        ÀR«ä¦Û¦b : ª¾ÃÑ­n¥Î¤ßÅé·|¡A¤~¯àÅܦ¨¦Û¤vªº´¼¼z¡C
ªð¦^¦Cªí ¤W¤@¥DÃD