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

[µo°Ý] ¦p¦ó¥Îexcelªº¥¨¶°¼g¤@­Ó¼´¸ê®Æ¦Ü¥t¤@­Ó¤u§@ªí¡A¨D¸Ñ

[µo°Ý] ¦p¦ó¥Îexcelªº¥¨¶°¼g¤@­Ó¼´¸ê®Æ¦Ü¥t¤@­Ó¤u§@ªí¡A¨D¸Ñ

²{¦b¦³¤@­ÓexcelÀɸ̭±¦³sheet1¡Bsheet2¡A¨â­Ó¤u§@ªí
sheet1ªº¤º®e¡A·Q¥Î¤@­ÓInputbox©ó¿é¤Jsheet1ªº½s¸¹«á±N¸Ó½s¸¹¤§¦P¤@¦C¥þ³¡
½Æ»s©Î¼´¦Üsheet2¡A¨C¦¸¼´§¹¬Ò·|¦Û°Ê´«¦C¡A¨D¸Ñ¡C
¥¼©R¦W.png   ¡ö¦¹¬°sheet1¤§¤º®e

3.png
¨D±M®a¸Ñ¡A«ô°U¤Forz

  1. Sub test()
  2.     Dim strID As String
  3.     Dim intSheet1RowCnt
  4.     Dim intSheet1RowCnter
  5.     Dim rngSheet1Target
  6.     Dim intSheet2RowCnt
  7.     strID = InputBox("¿é¤J½s¸¹")
  8.     intSheet1RowCnt = Sheets("Sheet1").Range("A1").End(xlDown).Row
  9.     For intSheet1RowCnter = 2 To intSheet1RowCnt
  10.         If Sheets("Sheet1").Range("A1").Offset(intSheet1RowCnter, 2) = strID Then
  11.             Set rngSheet1Target = Sheets("Sheet1").Range("A1").Offset(intSheet1RowCnter)
  12.             With Sheets("Sheet2")
  13.                 intSheet2RowCnt = .Range("A65536").End(xlUp).Row + 1
  14.                 .Cells(intSheet2RowCnt, 1) = rngSheet1Target
  15.                 .Cells(intSheet2RowCnt, 2) = rngSheet1Target.Offset(0, 1)
  16.                 .Cells(intSheet2RowCnt, 3) = rngSheet1Target.Offset(0, 2)
  17.             End With
  18.         End If
  19.     Next
  20. End Sub
½Æ»s¥N½X
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

¤µ¤éの¤@¬íは  ©ú¤éにない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

¦^´_ 1# wantknow55
  1. Option Explicit
  2. Sub Ex()
  3.     Dim BoxRow As Variant, BoxWord As Variant
  4.     BoxWord = Application.InputBox("¿é¤J½s¸¹", Type:=3)
  5.     If BoxWord = False Then Exit Sub
  6.     BoxRow = Application.Match(BoxWord, Sheets("Sheet1").Columns(3), 0)
  7.     'Match¨ç¼Æ¶Ç¦^¦bSheets("Sheet1").Columns(3)¤¤²Ä¤@­Ó=½s¸¹ªº¦ì¸m¸¹¼Æ
  8.     If IsNumeric(BoxRow) Then  'Match¨ç¼Æ¦³§ä¨ì¶Ç¦^¼Æ¦r,¤Ï¤§¶Ç¦^¿ù»~­È
  9.         With Sheets("Sheet2").Range("A65536").End(xlUp).Offset(1)
  10.            .Resize(, 3) = Sheets("Sheet1").Cells(BoxRow, 1).Resize(, 3).Value
  11.         End With
  12.     Else
  13.         MsgBox BoxWord & "  ½s¸¹§ä¤£¨ì !!"
  14.     End If
  15. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¤H­nª¾ºÖ¡B±¤ºÖ¡B¦A³yºÖ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD