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

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

¦^´_ 12# jcchiang
±z¦n,
§Ú§â´ú¸ÕÀɮתþ¤W,¤è«KÀ°§Ú¬Ý¤@¤U¶Ü?¥¦¨ÌµM¤£¯à¶K¤W¸ê®Æ
¥H©¹copy¸ê®Æ³£¬O¥H¦C¼Æ¬°·Ç,¦ý²{¦b¦³·sªº»Ý¨D,¥HEX: A:XÄ欰«ü©w°Ï¶¡,¶K¸ê®Æor¦V¥k¶K¤½¦¡
W.Sheets("¦h")ªºÄæ¼Æ= xcol
Sheets("·s")ªºA4 ¥H xcol¬°¨Ó·½,¥N¤J¤½¦¡,¦ý°õ¦æ³£µL§@¥Î,½Ð°Ý­n«ç»ò°µ??
´`Äæ¶K¸ê®Æ.rar (22.02 KB)

TOP

¦^´_ 11# PJChen
¥[­Ó"."
   Set Sh = W.Sheets("¦h")
        Sh.Activate
        i = "A2:E2"
            xcol = Sh.Range(i).Columns.Count  '¬Ý´Xµ§¸ê®Æ
        With W.Sheets("·s")
        W.Sheets("·s").Activate
       .Range("A4" & xcol).Value = "=" & "¦h!A3*¦h!C3" '¤½¦¡
       .Range("A4" & xcol).Value = .Range("A4" & xcol).Value
        
        End With   
¥t¥~Range("A4" & xcol),¦pªGxcol=5,«h¬°Range("A45")
¦pªG¬O­nRange("A4")¥[¤WxcolªºÄæ¦ì«h§ï¬°
.Range("A4").Resize(1, xcol).Value = "=" & " ¦h!A3*¦h!C3" '¤½¦¡
.Range("A4").Resize(1, xcol).Value = .Range("A4").Resize(1, xcol).Value
¦pªGxcol=5,³o¼ËRange("A4")¦ÜRange("E4")³£·|©ñ¤J¤½¦¡,¦ý¤½¦¡ªº¦ì¸m·|ÅܤÆ
¦pªG­n¦V¤U©ñ´N±NResize(1,xcol)§ï¬°Resize(xcol,1)
¥H¤W´£¨Ñ°Ñ¦Ò

TOP

¦^´_ 3# kim223824

½Ð°Ý: §Ú·Q§âÃþ¦üªº¤èªkÀ³¥Î¨ì¥H¤U...
W.Sheets("¦h")ªºÄæ¼Æ= xcol
Sheets("·s")ªºA4 ¥H xcol¬°¨Ó·½,¥N¤J¤½¦¡,¦ý°õ¦æ³£µL§@¥Î,½Ð°Ý­n«ç»ò°µ??
  1.    Set Sh = W.Sheets("¦h")
  2.         Sh.Activate
  3.         i = "A2:E2"
  4.             xcol = Sh.Range(i).Columns.Count  '¬Ý´Xµ§¸ê®Æ
  5.         With W.Sheets("·s")
  6.         W.Sheets("·s").Activate
  7.         Range("A4" & xcol).Value = "=" & "¦h!A3*¦h!C3" '¤½¦¡
  8.        Range("A4" & xcol).Value = Range("A4" & xcol).Value
  9.         
  10.         End With   
½Æ»s¥N½X

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

¦^´_ 8# jcchiang

ÁÂÁÂ

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

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

¦^´_ 1# PJChen

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

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

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

        ÀR«ä¦Û¦b : ¡i¬O§_µo´§¤F¨}¯à¡H¡j¤H¶¡¹Ø©R¦]¬°µu¼È¡A¤~§óÅã±o¬Ã¶Q¡CÃø±o¨Ó¤@½ë¤H¶¡¡AÀ³°Ý¬O§_¬°¤H¶¡µo´§¤F¦Û¤vªº¨}¯à¡A¦Ó¤£­n¤@¨ý¨Dªø¹Ø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD