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

[µo°Ý] Range()¤º¦r¦ê

[µo°Ý] Range()¤º¦r¦ê

½Ð°Ý¦U¦ì¤j¤j

¤U¦C³o¥|¦æRange()¸Ì­±ªº ¦r¦ê ¥i¥H¥u¥Î¤@¦æªí¥Ü¶Ü??
  1. Range("A4").Select
  2.     Range(Selection, Selection.End(xlDown)).Select
  3.     Range(Selection, Selection.End(xlDown)).Select
  4.     Range(Selection, Selection.End(xlUp)).Select
½Æ»s¥N½X

¦^´_ 1# prince120101


    §Ú¥u¯à¼g¨ì2¦æ¡K
  1. Sub test()
  2. [a4].End(4).Select
  3. Range(Selection, Selection.End(3).End(3)).Select
  4. End Sub
½Æ»s¥N½X

TOP

¦^´_ 1# prince120101
¬O³o¼Ë¶Ü?
  1. Sub Ex()
  2.     With Range("A4")
  3.         Range(.Cells, .End(xlDown).End(xlDown).End(xlUp)).Select
  4.     End With
  5. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 3# GBKEE
¦^´_ 2# owen06


·PÁ owen06 GBKEE ªº¦^ÂÐ


·|¦³³o·Qªk¬O
§ÚªºEXCEL VBA ªí³æ ¤W

°Ê§@µ{§Ç
¦³¨â­ÓListBox
ListBox1 ¤º®e¬O sheet1~sheet9
·í¿ï¾Üsheet1®É
ListBox2¤º®e·|Åã¥Ü sheet1"A4"¤§«á Àx¦s®æ¦³¸ê®Æªº¤º®e
·í¿ï¾Üsheet2®É
ListBox2¤º®e·|Åã¥Ü sheet2"A4"¤§«á Àx¦s®æ¦³¸ê®Æªº¤º®e..µ¥µ¥

µM¦Ó ³o sheet1~9 "A4" ¤@¶}©l¬OµL¸ê®Æªº «áÄò·|¼W¥[
  1. Range("A4").Select
  2. If ListBox1.Value = "sheet1" Then ListBox2.List = Workbooks("¬¡­¶Ã¯1.xlsm").Sheets("sheet1").Range(Selection, Selection.End(xlDown)).Value
  3. If ListBox1.Value = "sheet2" Then ListBox2.List = Workbooks("¬¡­¶Ã¯1.xlsm").Sheets("sheet2").Range(Selection, Selection.End(xlDown)).Value
½Æ»s¥N½X
¨º®É­Ô´ú¸Õ«á ¦pªG´«¿ï¾Üsheet2®É ³oµ{§Ç´N¥X²{¿ù»~¤F~
«á¨Ó¤]´N·Q»¡¬Ý¥i¤£¥i¥H§âRange("A4")©ñ¤J Range(Selection, Selection.End(xlDown))¸Ì­±
  1. Range("A4").Select
  2. Range(Selection, Selection.End(xlDown)).Select
  3. Range(Selection, Selection.End(xlDown)).Select
  4. Range(Selection, Selection.End(xlUp)).Select
½Æ»s¥N½X
³o¬O¨º®É­Ô¥Î¥¨¶°¿ý»sªº
¦ý¦pªG¹J¨ì¤@¶}©l"A4"¨S¸ê®Æªº®É­Ô
³o°Ê§@¤]´N¤£¦¨¥ß¤F

TOP

¦^´_ 4# prince120101
¸Õ¸Õ¬Ý
  1.     If ListBox1.Value <> "" Then
  2.         ListBox2.Clear
  3.         With Workbooks("¬¡­¶Ã¯1.xlsm").Sheets(ListBox1)
  4.             If .Range("A4").End(xlDown).Row <> .Rows.Count Then  '¦³¸ê®Æ
  5.                 ListBox2.List = .Range(.Range("A4"), .Range("A4").End(xlDown)).Value
  6.             End If
  7.         End With
  8.     End If
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 2# owen06

owen06 ¤j¤j

¥i§_½Ð±Ðend(3)¤¤ªº3¥Nªí¤°»ò·N«ä??
¯à±q¦ó³B¬d¸ß¬ÛÃöªº¸ê°T©O??

TOP

¦^´_ 6# ashan0418

  ¨º¬Oµ{¦¡ªºÂ²½X
    end(1)=end(xltoleft)
           2 =        xltoright
           3 =        xlup
           4 =        xldown

«Ü¦h«á­±¦³±µ¬A¸¹ªº»yªk¡A¨ä¹ê³£¦³¥N½X¥i¥H¿é¤J¥H¸`¬Ù®É¶¡¡A¥u¬O­n«ç»ò¬d¥i¯à­n¨ä¥L°ª¤â¤~¯à¸Ñµª¤F¡A
§Ú¤]¬OµL·N¶¡google®É¬Ý¨ìªº¡C

TOP

¦^´_ 7# owen06


­ì¨Ó¦p¦¹¡A·PÁ±zªº¤À¨É!!

TOP

¦^´_ 5# GBKEE

ÁÂÁÂ GBKEE
­è´ú¸Õ«á¥i¥H°Ê§@¤F

Sheets(ListBox1.Value)¤£¹L³oÃä¦n¹³­n¥[.value ¤~¯à°õ¦æ
  1. If ListBox1.Value <> "" Then
  2. ListBox2.Clear
  3. With Workbooks("¬¡­¶Ã¯.xlsm").Sheets(ListBox1.Value)
  4. If .Range("A4").End(xlDown).Row <> .Rows.Count Then  '¦³¸ê®Æ
  5. ListBox2.List = .Range(.Range("A4"), .Range("A4").End(xlDown)).Value
  6. End If
  7. End With
  8. End If
½Æ»s¥N½X

TOP

¦^´_ 7# owen06


    ·PÁ owen06 ªº¤À¨É~~~

TOP

        ÀR«ä¦Û¦b : ½_ÁJµ²±o¶V¹¡º¡¡A¶V·|©¹¤U««¡A¤@­Ó¤H¶V¦³¦¨´N¡A´N­n¶V¦³Á¾¨Rªº¯ÝÃÌ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD