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

[µo°Ý] ¦p¦ó§Q¥ÎVBA¦^¶Ç¤å¦r?

[µo°Ý] ¦p¦ó§Q¥ÎVBA¦^¶Ç¤å¦r?

°²¦pA1,B1

¦p¦ó¦bB1¿é¤J¥ô¦ó¤å¦r«á,A1·|¥X²{¯S©w¦w±Æªº¤å¦r,¦ýA1¤£·Q¿é¤J¥ô¦ó¨ç¼Æ,­n«O«ùªÅ¥Õ¡C
¨Ò¦p: B1¦p¿é¤JABC,A1·|¦Û°Ê²K¥[¹w³]ªº¤å¦r¦p¡¨DEF¡¨,¦ýA1¥»¨­¬OªÅ®æªº,¨ºÀ³¸Ó­n«ç»ò°µ©O?¨D°ª¤â«ü±Ð!

¦^´_ 14# lpk187

§Ú¤S¸Õ¤F¤@¤U,²{¦b¤S¥i¥H¤F,¤§«e¨º­Óworkbook¥i¯à¦³¨Ç°ÝÃD,Á`¤§ÁÂÁ¤j®a¤F!!

TOP

¦^´_ 14# lpk187


    ¤£¦æ®@,§Ú¤]¦³¸Õ¹L,¦ý¥þ³¡·|Åܦ¨1)

TOP

¦^´_ 13# leehom

§âCells(2, "A") = 1 §â³o¥y§ï¦¨    Cells(2, "A") = 1 & ")"

TOP

¦^´_ 12# GBKEE


    ³o­Ó«Ü´Î,¤£¦A­­©óABCD0123456³o­Ó®æ¦¡,¥ô¦óªøµu¼Æ¦r³£¥i¥H»¼¼W¡C¦A½Ð±Ð¤@¤U,¦pªG·QAªº¼Æ¦r¦Û°Ê¥[¬A¸¹­n«ç»ò¼g?¦p1),2),3).....,ÁÂÁÂ!!

TOP

¦^´_ 10# lpk187
¥i¥Î¦Û°Ê¶ñº¡,¸Õ¸Õ
  1. Sub Worksheet_Change(ByVal Target As Range)
  2.     Dim i As Integer
  3.     If Target.Address = "$B$2" Then
  4.     Application.EnableEvents = False
  5.     Cells(2, "A") = 1
  6.     i = Application.InputBox("How many numbers you want to add?", "Prompt", , , , , , 1)
  7.     With Range("A2:B2")
  8.         Range(.Cells.Offset(1), .Cells.End(xlDown)) = ""  '²M°£Â¦³¸ê®Æ
  9.         .AutoFill Range("A2:B2").Resize(i)    '¦Û°Ê¶ñº¡
  10.     End With
  11.     Application.EnableEvents = True
  12.     End If
  13. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 10# lpk187


    ²×©ó¦¨¥\¤F,·PÁ¦U¦ìªºÀ°¦£,¾Ç¨ì¤£¤Ö¤F,THX!!!

TOP

¦^´_ 9# leehom
  1. Sub worksheet_change(ByVal Target As Range)
  2.      If Target.Address = "$B$2" Then
  3.      Application.EnableEvents = False
  4.         Cells(2, Target.Column - 1) = 1
  5.      i = Application.InputBox("How many numbers you want to add?", "Prompt", , , , , , 1) - 1
  6.      For j = Target.Row + 1 To Target.Row + i
  7.          Cells(j, Target.Column) = Left(Cells(j - 1, Target.Column), 5) & Right(Cells(j - 1, Target.Column), 7) + 1
  8.          Cells(j, Target.Column - 1) = Cells(j, Target.Column - 1).Row - 1
  9.      Next
  10.      Application.EnableEvents = True
  11.      End If
  12. End Sub
½Æ»s¥N½X

TOP

¦^´_ 8# lpk187




¥ýÁ¤F,¥u®t¤@ÂIÂI´N§¹¬ü¤F,¦]¬°²{¦bA3¬O3,A4¬O4,¦ýªí®æ¤WÀ³¸Ó¬OA2¬O1,A3¬O2,A4¬O3,¦A¦¸«ô¦«²³¤j¯«¤F¡C

TOP

¦^´_ 7# leehom


    ¾ã­Ó¨«¦V¿ù»~¤F¡A¤£À³¸Ó³o¼Ë¥h¼g
¤@­Ó°ÝÃD¬O­n¦Ò¼{«á¨Ó¨Ï¥ÎªÌ¸Ó¦p¦ó¿é¤J¡A§A²Ä¤@­Ó°ÝÃD¨ì«á­±³o¤@­Ó°ÝÃD¡A®¦¦Òªº¤è¦V§¹¥þ¤£¦P¤F¡C
  1. Sub worksheet_change(ByVal Target As Range)
  2.      If Target.Address = "$B$2" Then
  3.      Application.EnableEvents = False
  4.      i = Application.InputBox("How many numbers you want to add?", "Prompt", , , , , , 1) - 1
  5.      For j = Target.Row + 1 To Target.Row + i
  6.          Cells(j, Target.Column) = Left(Cells(j - 1, Target.Column), 5) & Right(Cells(j - 1, Target.Column), 7) + 1
  7.          Cells(j, Target.Column - 1) = Cells(j, Target.Column - 1).Row
  8.      Next
  9.      Application.EnableEvents = True
  10.      End If
  11. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¬°¦Û¤v§äÂǤfªº¤H¥Ã»·¤£·|¶i¨B¡C
ªð¦^¦Cªí ¤W¤@¥DÃD