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

[µo°Ý] ½Ð°ÝRange¤º¦³Åܼƪº¼gªk

[µo°Ý] ½Ð°ÝRange¤º¦³Åܼƪº¼gªk

½Ð°Ý¦U¦ì~ §Ú¦b§O¤HªºVBA¤¤¬Ý¨ì³o­Óµ{¦¡

    x1x = InputBox("½Ð¿é¤J¶}©lrow")
    x2x = InputBox("½Ð¿é¤Jµ²§ôrow")
        
    Range("A1:B1").Value = Range("A" & x1x & ":B" & x1x & "").Value
    Range("A2:B2").Value = Range("A" & x2x & ":B" & x2x & "").Value

§Ú·Q½Ð°ÝRange¤¤ªº  ("A" & x1x & ":B" & x1x & "")  ¤@°ï " " ©M & ¬O«ç»ò¨Óªº?

¥t¥~·Q½Ð°ÝCell©MRange³£¬Oªí¥Ü¦ì¸m
¦ý¤@­Ó¬OÃþ¦ü§¤¼Ðªí¥Üªk¡A¥t¤@­Ó¬Oª½±µªº¦ì¸m(ex:C3)ªí¥Üªk
§Ú±`±`·d¤£²M·¡­n¥Î­þºØªí¥Üªk or ­n¤£­n¥[¤W " "
½Ð°Ý¤j®a¦b´y­zªº®É­Ô¦³¨S¦³¤°»ò¯S§Oªº°O¾Ð¤èªk©O?
·PÁÂ!!

¦^´_ 1# sweetkitty
&   : ³s±µ²Å¸¹:  ³s±µ¦r¦ê ©Î¼Æ¦r «e«á±µ¶·ªÅ¤@®æ
¨Ò¦p  x1x=10
  "A" & x1x & ":B" & x1x  ->¦r¦ê  "A10:B10"
" ABC"  : ¦r¦ê  
""          : ªÅ¦r¦ê
[A = 1 & 2      ---> "12"    ¬°¦r¦ê
A=12  &  ""   --->" 12"    ¬°¦r¦ê
Range :½d³ò            Range("A10:B10" ).Select
cells: ²Ó­M ³æ¤¸.      Range(Cells(10, "A"), Cells(10, "B")).Select

TOP

½Ð°Ý¥ý¶i, ¨Ï¥Î cells(10,"a")  & cells(10,1 ) ¨âªÌ¼gªº¤è¦¡, ¦b³t«×¤W·|¦³«Ü¤jªº®t²§¶Ü ?
§Ú³q±`³£¨Ï¥Î cells(10,1) ªº¤è¦¡¼g, ¤£¹L, Äæ¦ì¦h¤F«á, ´NÁÙ­n¤@­ÓÄæ¦ì¤@­ÓÄæ¦ì¼Æ..
Homeman

TOP

¦^´_ 3# homeman
cells(10,"a") , cells(10,1 )  Äæ¦ì°Ñ¼Æ ®t§O¦b¥Î  ¼Æ¦r ©Î  ¦r¥À¦r¦ê ,¤£ª¾»P³t«×¦³¦óÃö«Y.

TOP

¦^´_ 2# GBKEE


±z¦n~ «D±`·PÁ±zªº¦^µª
&«e«á¥²¶·ªÅ®æ¤]¬O³W©wªü?
¦pªG¤£±`¼gªº¸Ü¯uªº«ÜÃø°O±o©O >"<

¥t¥~½Ð°Ý
Range :½d³ò            Range("A10:B10" ).Select
cells: ²Ó­M ³æ¤¸.      Range(Cells(10, "A"), Cells(10, "B")).Select
¤W­±ªº­n¥[¤W " " ¡A ©³¤Uªº¤£¥Î
¤S¬O¤°»ò¹D²z©O?

TOP

¦^´_ 5# sweetkitty
¤W­±ªº­n¥[¤W " " ¡A ©³¤Uªº¤£¥Î ¤S¬O¤°»ò¹D²z©O?
½Ð¬Ý 3#    4#    ¥i¼I¸Ñ

TOP

¦^´_ 6# GBKEE

©Ò¥H¬O¼Æ¦r©M¦r¦êªº®t§O¶Ü?

·PÁ§A ^^

TOP

¦^´_ 7# sweetkitty

§Aªº°ÝÃD³£¬O°ò¥»»yªk°ÝÃD
»yªk´N¬Oµ{¦¡ªº¤åªk¡A¨Ï¥ÎªÌ­n»P¹q¸£·¾³q¡A´N¥²¶·¿í¦u³o¨Ç³W«h
©Ò¿×¦r¦ê¤]´N¬O¥ô¦ó¦r¤¸ªº±`¼Æ¡A³QÂù¤Þ¸¹" "¼Ð¥Ü°_¨Ó´N¥s°µ¦r¦ê
¦p1¡A2¡A3µ¥¼Æ¦r­ì¥»¬O¼Æ­È«¬ºAªº¦r¤¸¡A¥[¤WÂù¤Þ¸¹¥H«á"1"¡A"2"¡A"3"´NÅܦ¨¤F¦r¦ê§ÎºAªº¸ê®Æ
¦r¦êªº³s±µ²Å¸¹´N¬O&¡A±N¦r¦ê¤w&²Å¸¹³s±µ®É¥²¶·¥HªÅ¥ÕÁä¤À¹j
¨Ò¦p1¡A2¡A3³o3­Ó¼Æ¦r­n³s±µ¦¨123¡A¥²¶·¨Ï¥Î&
1 & 2 & 3©Î"1" & "2" & "3"
¦ý¼Æ¦r¥H¥~ªº¦r¤¸´N¥²¶·¨Ï¥ÎÂù¤Þ¸¹¼Ð¥Ü¡A§_«h·|³Q»{©w¬°ÅܼƦWºÙ
°õ¦æ¤U¦Cµ{¦¡¡A¥i¤F¸Ñ
  1. Sub ex()
  2. MsgBox 1 & 2 & 3
  3. MsgBox "1" & "2" & "3"
  4. MsgBox "A" & "B" & "C"
  5. MsgBox ABC '¦¹µ²ªG·|Åã¥ÜªÅ¦r¦ê
  6. End Sub
½Æ»s¥N½X
RANGE»PCELLS½Ð°Ñ¦ÒVBA»¡©ú
1.  Range ÄÝ©Ê
¥i¥Î Range(arg) ¶Ç¦^¥Nªí³æ­ÓÀx¦s®æ©ÎÀx¦s®æ½d³òªº Range ª«¥ó¡A¨ä¤¤ arg ¬°½d³ò¦WºÙ(¦r¦ê«¬ºA)¡C
2.  Cells ÄÝ©Ê
¥i¥Î Cells(row, column) ¶Ç¦^³æ­ÓÀx¦s®æ¡A¨ä¤¤ row ¬°¦C¯Á¤Þ¡Acolumn ¬°Äæ¯Á¤Þ¡C(¯Á¤Þ¬°Äæ¦Cªº½s¸¹¡A¨ä¤¤column¥i¨Ï¥ÎÄæ¦WºÙ¦r¦ê)
3.  Range ©M Cells
¥i¥Î Range(cell1, cell2) ¶Ç¦^ Range ª«¥ó¡A¨ä¤¤ cell1 ©M cell2 ¬°«ü©w°_©l©M²×¤î¦ì¸mªº Range ª«¥ó¡C
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

·PÁ¶W¯Åª©¥Dªº¦^À³... §Úªº°ÝÃD¯u¬O¶Wªì¯Åªºªü...  ©ç¤ô >///<

TOP

¦^´_ 4# GBKEE


    :P ¦]¬°¥H range & cells ªº¼gªk, ³t«×¤W¯uªº¦³®t, ©Ò¥H, °Ý¤F¤@­Ó²Â°ÝÃD, ÁÂÁ±zªº¦^ÂÐ.
Homeman

TOP

        ÀR«ä¦Û¦b : Ä@­n¤j¡B§Ó­n°í¡B®ð­n¬X¡B¤ß­n²Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD