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

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

  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

        ÀR«ä¦Û¦b : ¨ü¤HÂI¤ô¤§®¦¡A¶··í´é¬u¥H³ø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD