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

[µo°Ý] Åý¤½¦¡ªº­È,ª½±µ±a¤JÀx¦s®æ

[µo°Ý] Åý¤½¦¡ªº­È,ª½±µ±a¤JÀx¦s®æ

½Ð°Ý¤j¤j,

§Ú­nÅýJQ4­pºâ¨Ã±o¨ìAH4-BR4ªºµ²ªG,¦ý¥u­n­È(¤£­n®æ¦¡)´N¦n,§Ú¬O¥Î¥H¤U»yªk,
½Ð°Ý¦³¨ä¥L»yªk,¥i¥Hª½±µÅýAH4-BR4ªº­È,ª½±µ±a¤J¨ìJQ4¤@ª½¨ì¦p¦PFÄ檺¦C¼Æ,
¦Ó¤£­n¹³¥H¤U½wºCªº¨BÆJ,¦]¬°Àɮפ¤³£¬O¤½¦¡,¦­¤W¤~run¤F¤@¤U,¾ã­Ó³£·í¾÷¤F.
  1.         With Sh
  2.         Sh.Activate
  3.             Range("JQ2") = Range("H1").Value  '«e¤@¤é®w¦sÁ`¼Æ,¶K¨ìAH
  4.             Range("JQ4") = "=" & "AH4-BR4"
  5.             Range("JQ4").Copy
  6.             xRow = Cells(Cells.Rows.Count, "F").End(xlUp).Row  '¬ÝFÄæ¦ì´Xµ§¸ê®Æ
  7.             Set Rng = Range("JQ4:JQ" & xRow)
  8.             Rng.PasteSpecial Paste:=xlPasteFormulas  '¿ï¾Ü©Ê¶K¤W¤½¦¡
  9.             Application.CutCopyMode = False '¨Ï¨Ó·½ªºcopyªºµê½u°{°Ê°±¤î
  10.             Application.DisplayAlerts = False '¦bµ{§Ç°õ¦æ¹Lµ{¤¤¨Ï¥X²{ªºÄµ§i®Ø¤£Åã¥Ü
  11.             Application.Calculation = xlAutomatic    '¦Û°Ê­pºâ
  12.             Rng = Rng.Value
  13.         End With
½Æ»s¥N½X

¦^´_ 1# PJChen

¸Õ¸Õ¬Ý
Sub ex()
r = [F65535].End(3).Row                    'FÄæ¦ì¼Æ
[JQ4].Resize(r) = "=AH4-BR4"          'JQ4¥H¤U(¥HFÄæ¦ì¼Æ¶qªø«×)¸m¤J¤½¦¡
[JQ:JQ] = [JQ:JQ].Value                      '±N¤½¦¡Âର¼Æ­È
End Sub

TOP

¦^´_ 1# PJChen

³o¼Ë¸Õ¸Õ¡C

With Sh

Sh.Activate
Range("JQ2") = Range("H1").Value  '«e¤@¤é®w¦sÁ`¼Æ,¶K¨ìAH

xRow = Cells(Cells.Rows.Count, "F").End(xlUp).Row  '¬ÝFÄæ¦ì´Xµ§¸ê®Æ
Range("JQ4:JQ" & xRow).value = "=AH4-BR4"
Range("JQ4:JQ" & xRow).value  = Range("JQ4:JQ" & xRow).value   'Âà´«­È

end With

TOP

¦^´_ 2# jcchiang
¦^´_ 3# kim223824

·PÁ¨â¦ìªºÀ°¦£,µª®×³£¥i¥H¥Î

½Ð°Ýjcchiang
r = [F65535].End(3).Row
«á­±ªºEnd(3) «ç»ò¸ÑŪ?
¥¦±o¥Xªºµª®×·|¦h3¦C,¶W¥XFÄæ¦C¼Æ
¥»¨Ó¥H¬°­n§ï¬°(0),µ²ªG¤£¯à¥Î,½Ð°Ý­n¦p¦ó°µ?

TOP

¦^´_ 4# PJChen


r = [F65535].End(3).Row > ¬O³Ì«á¤@µ§¸ê®Æªº--¦C¸¹

r = [F65535].End(3).Row -3 > ´î¥h¼ÐÃD¦C¤W¤èªº¦C¼Æ, ¤~¬O¸ê®Æªº--µ§¼Æ


r = [F65535].End(3).Row > (3) = (xlup)

TOP

¦^´_ 1# PJChen

Range("JQ4") = "=" & "AH4-BR4"
³o¥u¬O²³æ¤½¦¡, ¨Ã¤£¤Ó¯Ó®Ä¯à,
°£«D¦æ¼Æ¤Ó¦h,
¬Æ¦Ü¤w¦³¨ä¥¦¤j¶q¤½¦¡[¥¿¦b¤Þ¥Î]JQÄæ, ©Ò¥H¤~·|©ì²Ö³t«×

TOP

¦^´_ 5# ­ã´£³¡ªL
·PÁ­ã¤j,
r = [F65535].End(3).Row -3 ¸ê®Æ´N¥i¥H¥¿±`
Ãö©óEnd(3)....§Ú·Q³oÀ³¸Ó¦UºØ¥N¸¹¦³¤£¦Pªº¥Îªk,½Ð°Ý­þ¸Ì¥i¥H¦³³o­Ó¥N¸¹¸Ñ»¡?

TOP

¦^´_ 7# PJChen

½Ð°Ñ¦Ò!!
https://blog.csdn.net/xuemanqianshan/article/details/89305212
¦V¥ª xlToLeft - -----1       
¦V¥k xlToRight - ---2       
¦V¤W xlUp - ---------3       
¦V¤U xlDown -------4

TOP

¦^´_ 8# jcchiang

ÁÂÁÂ

TOP

¦^´_ 3# kim223824

¦n·PÁ§A±Ðªº³o¬qµ{¦¡,§Ú«Ü±`¥Î¨ì³o­Ó,¯u¬O¹ê¥Î,¤Ó·PÁ¤F...
With Sh

Sh.Activate
Range("JQ2") = Range("H1").Value  '«e¤@¤é®w¦sÁ`¼Æ,¶K¨ìAH

xRow = Cells(Cells.Rows.Count, "F").End(xlUp).Row  '¬ÝFÄæ¦ì´Xµ§¸ê®Æ
Range("JQ4:JQ" & xRow).value = "=AH4-BR4"
Range("JQ4:JQ" & xRow).value  = Range("JQ4:JQ" & xRow).value   'Âà´«­È

end With

TOP

        ÀR«ä¦Û¦b : ¤H¥Í¤£¤@©w²y²y¬O¦n²y¡A¦ý¬O¦³¾ú½mªº±j¥´ªÌ¡AÀH®É³£¥i¥H´§´Î¡C
ªð¦^¦Cªí ¤W¤@¥DÃD