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

·s¼W»P¬d§äµ{¦¡­×§ï

¦^´_ 1# shootingstar
  1. Sub Âà¼g()
  2.     Dim motoHani As Range, sakisht As Worksheet, sakrng As Range
  3.     Set motoHani = [F3].Resize(7)
  4.     If IsError(Application.Match([F2], [B3:B8], 0)) Then MsgBox "¨S¦³ «¬¸¹!! ": Exit Sub
  5.     If [F5] = "" Then MsgBox "¨S¦³ ¤J¥X®w³æ¸¹!! ": Exit Sub
  6.     Set sakisht = Worksheets([F2].Value)
  7.     Set sakrng = sakisht.Range("A" & Rows.Count).End(xlUp).Offset(1)
  8.     sakrng.Resize(, 7).Value = Application.Transpose(motoHani)
  9.     MsgBox "¿é¤J§¹²¦"
  10. End Sub
  11. Sub ¬d§ä()
  12.     Dim motoHani, myRng As Range
  13.     Set motoHani = [F3].Resize(7)
  14.     If IsError(Application.Match([F2], [B3:B8], 0)) Then MsgBox "¨S¦³ «¬¸¹!! ": Exit Sub
  15.     If [F5] = "" Then MsgBox "¨S¦³ ¤J¥X®w³æ¸¹!! ": Exit Sub
  16.     Set myRng = Sheets([F2].Value).Columns(3).Find([F5], LookAt:=xlWhole)
  17.     If myRng Is Nothing Then MsgBox "¨S¦³²Å¦X±ø¥óªº¸ê®Æ¡I":   Exit Sub
  18.     Set myRng = Sheets([F2].Value).Cells(myRng.Row, 1)
  19.     Set myRng = myRng.Resize(, 7)
  20.     motoHani.Value = Application.Transpose(myRng)
  21. End Sub
½Æ»s¥N½X

TOP

¦^´_ 3# sheau-lan
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     ¬d§ä "¬d§ä"   'xlword °Ñ¼Æ
  4.     ¬d§ä "§R°£"   'xlword °Ñ¼Æ
  5. End Sub
  6. Sub ¬d§ä(xlword As String)   'xlword ¶Ç»¼ªº°Ñ¼Æ ¬° "¬d§ä" ©Î "§R°£"
  7.     Dim motoHani, myRng As Range
  8.     Set motoHani = [F3].Resize(7)
  9.     If IsError(Application.Match([F2], [B3:B8], 0)) Then MsgBox "¨S¦³ «¬¸¹!! ": Exit Sub
  10.     If [F5] = "" Then MsgBox "¨S¦³ ¤J¥X®w³æ¸¹!! ": Exit Sub
  11.     Set myRng = Sheets([F2].Value).Columns(3).Find([F5], LookAt:=xlWhole)
  12.     If myRng Is Nothing Then MsgBox "¨S¦³²Å¦X±ø¥óªº¸ê®Æ¡I":   Exit Sub
  13.     Set myRng = Sheets([F2].Value).Cells(myRng.Row, 1)
  14.     If xlword = "¬d§ä" Then                           'xlword ¶Ç»¼ªº°Ñ¼Æ ¬° "¬d§ä"
  15.         Set myRng = myRng.Resize(, 7)
  16.         motoHani.Value = Application.Transpose(myRng)
  17.     ElseIf xlword = "¬d§ä" Then                       'xlword ¶Ç»¼ªº°Ñ¼Æ ¬° "§R°£"
  18.         myRng.Resize(, 7).Delete Shift:=xlUp          '¦b³o¸Ì§R°£¸ê®Æ
  19.     End If
  20. End Sub
½Æ»s¥N½X

TOP

¦^´_ 5# sheau-lan
³Ì«á¥[¤W
  1. [F2].Resize(8) = ""
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¶¢¤HµL¼Ö½ì¡A¦£¤HµL¬O«D¡C
ªð¦^¦Cªí ¤W¤@¥DÃD