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

EXCEL VBA ·í·Æ¹«¿ï¨úÀx¦s®æ ÅܼưÝÃD(¤w¸Ñ¨M)

EXCEL VBA ·í·Æ¹«¿ï¨úÀx¦s®æ ÅܼưÝÃD(¤w¸Ñ¨M)

¥»©«³Ì«á¥Ñ GBKEE ©ó 2011-11-11 18:37 ½s¿è

·Q½Ð°Ý¤@¤U¦U¦ì°ª¤â  °²¦p§Ú°µ¤F¤@Áû«ö¶s  §Ú§Æ±æ«ö¤U¥h«á ¥L·|§â§Ú·í«e·Æ¹«¿ï¨úªº½Æ¼ÆÀx¦s®æ°µ ¸óÄæ¸m¤¤ ªº°Ê§@ µM«á§â¥LªºÄæ¦ì+1 ¤]°µ¸óÄæ¸m¤¤ªº°Ê§@ §Ú¸Ó«ç»ò¼g?


EX: ·Æ¹«¥Ø«e¿ï¨ú¨ì  A1:A3 «ö¶s«ö¤U¥h¥L·|§â ³o­Ó½d³òÀx¦s®æ°µ¸óÄæ¸m¤¤ µM«á¦A§â B1:B3 ¤]°µ¸óÄæ¸m¤¤


§Ú¤@ª½¨S¦³¿ìªk§ì¨ì·Æ¹«¿ï¨úªº½d³ò·í§@ÅÜ¼Æ ½Ð¦U¦ì°ª¤â±Ï±Ï§Ú ÁÂÁÂ

°ª¤â ÁÂÁ§A §Ú§ËÀ´¤F ·PÁ±zªº±Ð¾É


With Union(Selection, Selection.Offset(0, 0))
.HorizontalAlignment = xlCenter
        .VerticalAlignment = xlCenter
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = False
    End With
    Selection.Merge
   With Union(Selection, Selection.Offset(0, 1))
.HorizontalAlignment = xlCenter
        .VerticalAlignment = xlCenter
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = False
    End With
    Selection.Merge


­ì¨Ó­«ÂI­n§Q¥Î OFFSETÄÝ©Ê  §Ú¤@ª½¦b·QSELECT¨º¶ô ·P®¦

TOP

³o­Óµ{¦¡¬Ý§¹«á §ÚÁÙ¦³¨â­Ó°ÝÃD­n½Ð±Ð¤@¤U
1. ¦o·|¦h¼g¤J¤@¦æ ¬O¬°Ô£»ò   (¿ï¨ú3¦C ¥L·|¼g¤J¥|¦Cªº¸ê®Æ)
2. ¥L­n«ç»òÄæ¼Æ+1 ¦AÄ~Äò°µ¤@¦¸°Ê§@?

TOP

¥»©«³Ì«á¥Ñ billkater000 ©ó 2011-11-11 17:10 ½s¿è

©êºp ¥i¥H»¡ªº¸Ô²Ó¤@ÂI¶Ü §Úµ{«×¨S¦³«Ü¦n ·PÁ°ª¤â

TOP

With Union(Selection, Selection.Offset(1))
.Value = 123
  .HorizontalAlignment = 7
  End With

TOP

        ÀR«ä¦Û¦b : «Ý¤H°h¤@¨B¡A·R¤H¼e¤@¤o¡A´N·|¬¡±o«Ü§Ö¼Ö¡C
ªð¦^¦Cªí ¤W¤@¥DÃD