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

[µo°Ý] ½Ð°Ý¦U¦ì¤j¤j!

[µo°Ý] ½Ð°Ý¦U¦ì¤j¤j!

j = InputBox("¿é¤J¼Æ¶q", , 0)
    Sheets("­ì©lÀÉ").Select
    Range("B5 & ":D" & j + 4).Select

½Ð°Ý¦U¦ì¤j¤j
¤p§Ì·Q±Nµ{¦¡½X­×§ï¦¨

¿é¤J¤£¦P¼Æ¶q«á
µ{¦¡½X¯à±N©Ò»Ý­nªºÄæ¦ì¿ï¾Ü°_¨Ó
¥B¿ï¾Ü¹Lªº·|±q¤U¤@µ§¶}©l¿ï¾Ü

¨Ò¦p
°²³]­ì©lÀɱq²Ä5¦C¶}©l¦³100¦C¸ê®Æ
¤@¶}©lªºInputBox¿é¤J10   µ{¦¡½X·|§ìB5¨ìD14
¤U¤@­ÓInputBox¿é¤J7      µ{¦¡½X«h§ìB15¨ìD21
¤@ª½§ì¨ì­ì©lÀɪº100¦C¸ê®Æ§ì§¹

½Ð°Ý¦U¦ì¤j¤j
¤p§Ì¸Ó¦p¦ó­×§ï?
·PÁÂ!

¦^´_ 1# koiiven
  1. Sub nn()
  2. Dim j&
  3. Do Until s >= 100
  4. j = InputBox("¿é¤J¼Æ¶q", , 0)
  5.     Range("B5").Offset(s, 0).Resize(j, 3).Select
  6. s = s + j
  7. Loop
  8. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

°õ¦æOK
·PÁ¤j¤jÀ°¦£

¤p§Ì·Q½Ð°ÝRangeªº°ÝÃD
  1. Sub Macro2()
  2. Dim j&
  3. Dim k&
  4. k = InputBox("Á`¼Æ¶q", , 0)

  5. Do Until s >= k
  6. i = InputBox("¿é¤J¦WºÙ", , 0)
  7. j = InputBox("¿é¤J¼Æ¶q", , 0)
  8.    
  9.     Sheets("ªÅ¥Õªí®æ").Select
  10.     Sheets("ªÅ¥Õªí®æ").Copy After:=Sheets(2)
  11.     Sheets(3).Select
  12.     Sheets(3).Name = i
  13.    
  14.     Sheets("­ì©lÀÉ").Select
  15.     Range("B5").Offset(s, 0).Resize(j, 3).Select
  16. s = s + j
  17.     Selection.Copy
  18.     Sheets(3).Select
  19.     Range("C7").Select
  20.     Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
  21.         :=False, Transpose:=False
  22.    
  23.     Sheets("­ì©lÀÉ").Select
  24.     Range("H5").Offset(s, 0).Resize(j, 1).Select   '·|¿ï¾ÜH8¨ìH10   ¸Ó¦p¦ó­×§ï¤~¯à¿ï¾ÜH5¨ìH7©O?
  25. s = s + j
  26.     Selection.Copy
  27.     Sheets(3).Select
  28.     Range("F7").Select
  29.     Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
  30.         :=False, Transpose:=False

  31. Loop

  32. End Sub
½Æ»s¥N½X
°²³]j¿é¤J3
µ{¦¡·|¿ï¾Ü(B5:D7)ªº½d³ò

¦ý¨ì¤FH5®É
«hª½±µ±qH8¶}©l¿ï¾Ü

¦pªG·Q¤@¼Ë±qH5¶}©l¿ï¾Ü
½Ð°Ý¸Ó¦p¦ó­×§ï?

·PÁ¤j¤j

TOP

¦^´_ 3# koiiven
Range("H5").Offset(s, 0).Resize(j, 1).Select   '·|¿ï¾ÜH8¨ìH10   ¸Ó¦p¦ó­×§ï¤~¯à¿ï¾ÜH5¨ìH7©O?
Range("H5").Resize(j, 1).Select  ¬O³o¼Ë¶Ü?

TOP

¦^´_ 3# koiiven

§Ú»{¬°¬O¦b¦P¤@­Ós­È­n°µ¨âÄæ¦ìªº¿ï¨ú¡A¹ï¶Ü?
¨ºs´N­n°õ¦æ§¹¨â¦¸«á¦A¥[¤Wj
  1. Sub Macro2()
  2. Dim j&
  3. Dim k&
  4. k = InputBox("Á`¼Æ¶q", , 0)

  5. Do Until s >= k
  6. i = InputBox("¿é¤J¦WºÙ", , 0)
  7. j = InputBox("¿é¤J¼Æ¶q", , 0)
  8.    
  9.     Sheets("ªÅ¥Õªí®æ").Select
  10.     Sheets("ªÅ¥Õªí®æ").Copy After:=Sheets(2)
  11.     Sheets(3).Select
  12.     Sheets(3).Name = i
  13.    
  14.     Sheets("­ì©lÀÉ").Select
  15.     Range("B5").Offset(s, 0).Resize(j, 3).Select
  16.     Selection.Copy
  17.     Sheets(3).Select
  18.     Range("C7").Select
  19.     Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
  20.         :=False, Transpose:=False
  21.    
  22.     Sheets("­ì©lÀÉ").Select
  23.     Range("H5").Offset(s, 0).Resize(j, 1).Select   '·|¿ï¾ÜH8¨ìH10   ¸Ó¦p¦ó­×§ï¤~¯à¿ï¾ÜH5¨ìH7©O?
  24. s = s + j
  25.     Selection.Copy
  26.     Sheets(3).Select
  27.     Range("F7").Select
  28.     Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
  29.         :=False, Transpose:=False

  30. Loop

  31. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

­ì¨Ó¦p¦¹
§âs = s + j²¾¨ì³Ì«á¦b°õ¦æ

·PÁ¨â¦ì¤j¤jÀ°¦£

TOP

¤p§Ì«ôŪ¹L³o½g [Âà¶K] VBAªº¼g§@§Þ¥©»P¼W¶i®Ä¯à

±Nµ{¦¡½X§ï¦¨
  1. Sub Macro2()
  2. Dim j&
  3. Dim k&
  4. k = InputBox("¤¸¥óÁ`¼Æ¶q", , 0)

  5. Do Until s >= k
  6. i = InputBox("¿é¤J³ø§i¦WºÙ", , 0)
  7. j = InputBox("¿é¤J¤¸¥ó¼Æ¶q", , 0)
  8.    
  9.     Sheets("ªÅ¥Õªí®æ").Select
  10.     Sheets("ªÅ¥Õªí®æ").Copy After:=Sheets(2)
  11.     Sheets(3).Select
  12.     Sheets(3).Name = i
  13.    
  14.     Sheets(3).Range("C7") = Sheets("­ì©lÀÉ").Range("B5").Offset(s, 0).Resize(j, 3)

  15. s = s + j

  16. Loop

  17. End Sub
½Æ»s¥N½X
¥i¬Oµ{¦¡¹B§@§¹¤§«á¨S¦³¤ÏÀ³
·Q½Ð°Ý¤j¤j¸Ó¦p¦ó­×§ï?

¦¹¥~
  1. Sub Macro3()
  2. '
  3. ' Macro5 Macro
  4. '

  5. '
  6.    
  7. i = InputBox("¦~", , 0)
  8. j = InputBox("¤ë", , 0)
  9. k =InputBox("¤é", , 0)

  10.        Range("A1").Select
  11.        ActiveCell.FormulaR1C1 =    '
  12.    
  13. End Sub
½Æ»s¥N½X
·Q½Ð°Ý¤j¤j
¦pªG·Q¦b InputBox¥´¤J¤é´Á¦~¤ë¤é
¦ý¥u´À´«A1Àx¦s®æ¤ºXXX¦~XX¤ëXX¤é¤ºªºX¥N¸¹
µ¥¸¹«á­±ªºµ{¦¡½X¸Ó¦p¦ó¼¶¼g?

·PÁ¤j¤j

TOP

¦^´_ 7# koiiven
ActiveCell= DateSerial( i, j, k)

TOP

·PÁ¤j¤j¦^ÂÐ

°õ¦æ¤§«á¬°¦è¤¸ªº¦~¥÷

¥B®æ¦¡¬°xxxx/xx/xx

¦³¿ìªk±N¦~¤À³]©w¬°¥Á°ê
¥B®æ¦¡¬°xxx¦~xx¤ëxx¤é

¥H
i = InputBox("¦~", , 0)
j = InputBox("¤ë", , 0)
k = InputBox("¤é", , 0)

§Y¥i´À´«x¤ºªº¼Æ­È

·PÁÂ

TOP

¦^´_ 9# koiiven
  1. With ActiveCell
  2.     .Value = DateSerial(i, j, k)
  3.     .NumberFormatLocal = "[$-404]e""¦~""m""¤ë""d""¤é"";@"
  4. End With
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ­n§åµû§O¤H®É¡A¥ý·Q·Q¦Û¤v¬O§_§¹¬üµL¯Ê¡C
ªð¦^¦Cªí ¤W¤@¥DÃD