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

[µo°Ý] ¬d¸ß´£¥Ü°ÝÃD(¥H¸Ñ¨M¡A·PÁÂGBKEEªºÀ°¦£)

[µo°Ý] ¬d¸ß´£¥Ü°ÝÃD(¥H¸Ñ¨M¡A·PÁÂGBKEEªºÀ°¦£)

¥»©«³Ì«á¥Ñ olisun ©ó 2010-8-10 12:14 ½s¿è

§Ú§Æ±æ·í¬d¸ß¶g¦¸©|¥¼¿é¤J®É¡A¯à°÷¦b¬d¸ßªº®É­Ô·|¥X²{"µL¦¹¶g¦¸"¡A¨ÃÂ÷¶}¦¹µ{§Ç
¦pªG­n¬d¸ßªº¶g¦¸¦s¦b¡A«hÄ~Äòµ{§Ç
¤£ª¾­þ¿ù¤F¡A´N¬O¦³°ÝÃD
Private Sub CommandButton1_Click() '¬d¸ß
    Dim a As Integer
       Dim b As Range
         Dim t As Range
           Dim r As Range
   
    Sheets(5).Range("f4:g37") = ""
      Sheets(5).Range("j4:k37") = ""
       Sheets(5).Range("n437") = ""
         Sheets(5).Range("a5") = ""
           Sheets(5).Range("a29") = ""
             Sheets(5).Range("a35") = ""

a:                      czxm = InputBox("¿é¤J¬d¸ß¶g¦¸!")
   
    With Sheets("ªì¬Ý¥¼ÁÊ­ì¦]")
        Set r = .Range("A4:A" & .Range("A65536").End(xlUp).Row)

  On Error Resume Next
   d = .Cells(.Range("A4:A").Find(czxm).Row, 1)
  If d = czxm Then
   MsgBox "µL¦¹¶g¦¸", 0
  Exit Sub
End If
End With
With Sheets(5)
     Set c = Sheets(2).Range("A:A").Find(czxm, lookat:=xlWhole)
   
       If Not c Is Nothing And czxm > "1" Then
         Sheets(5).Range("a5").Value = czxm
            Sheets(5).Range("a29").Value = Sheets(2).Cells(c.Row, 2).Value '¤é´Á
                     .Range("a35").Value = .Range("a29").Value + 6 '¤é´Á
         Arr = Sheets(2).[a4].Resize(c.Row - 4, 36)    '¼W¥[
         Arr1 = Sheets(3).[a4].Resize(c.Row - 4, 36)    '¼W¥[
         Arr2 = Sheets(4).[a4].Resize(c.Row - 4, 36)    '¼W¥[

a:                      czxm = InputBox("¿é¤J¬d¸ß¶g¦¸!")

³o¤@¦æ«e­±ªº a: ¥i¯à¬O°ÝÃD©Ò¦b,  («Øij§A¾i¦¨±Æ¦C¦nµ{¦¡¤¤¤å¦rªº²ßºD,·|¤ñ¸û¤è«K§ä°ÝÃDÂI)
·í°ÝÃDµo¥Í®É¥i¥H¦b°T®§µøµ¡¤¤«ö "°»¿ù" «öÁä§ä°ÝÃDÂI,
µM¦Ó¤§«á¥X²{ªºµe­±¤¤,
¤£¨£±o¤Ï¶À°Ï´N¬O°ÝÃDÂI.

¬Û¤Ïªº­Y¥X²{¤p¤pªº¤ÏÂŦr¤¸¤~¬O°ÝÃDµo¥Íªº­ì¦],
ÁöµM¨º­Ó¤ÏÂŦr¤¸¥i¯à«Ü¤p,
¤p¨ì´X¥G§Ñ¤F¥¦ªº¦s¦b...
(§Ú±`±`­n¬Ý¦Ñ¥b¤Ñ¤~µo²{¦³¥¦ªº¦s¦b.XD)

TOP

§Ú³o¼Ë³]©wªºµ²ªG¬O
¿é¤J¤£¦s¦bªº¶g¦¸¨Ã¨S¦³¥X²{MsgBox "µL¦¹¶g¦¸", 0ªº§@¥Î¡A¦ý¬O·|exit sub
´N¬O»¡°£¤F¨S¦³¥X²{ĵ§i¤§¥~¡A¤@¤Á³£²Å¦X­n¨D¡A©Ò¥H¤£ª¾¬O­þ¿ù©O

TOP

¨S¦³¹ê»Ú»Ý­n,¤£­n¥ÎOn Error Resume Next

¤W­±¥N½X¤]¤£§¹¾ã,§Ú¥u¬Ý¨ìend with«eªº

¸Õ¸Õ§â
On Error Resume Next
   d = .Cells(.Range("A4:A").Find(czxm).Row, 1)
  If d = czxm Then
   MsgBox "µL¦¹¶g¦¸", 0
  Exit Sub
End If

´«¦¨
  1. d=r.Find(czxm)
  2. if d is nothing Then
  3.    MsgBox "µL¦¹¶g¦¸", 0
  4.    Exit Sub
  5. end If
½Æ»s¥N½X
¬O¬d¬d¦baÄæ§ä¤£§ä¨ìczxmªº·N«ä.
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

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

TOP

¸g¹L´ú¸Õ
1.¦pªG¿é¤J¦s¦bªº¶g¦¸¡A«h°õ¦æ¨ì MsgBox "µL¦¹¶g¦¸", 0   ¥X²{°õ¦æ¶¥¬q¿ù»~"424"  ¦¹³B»Ý­nª«¥ó¡C
2.¦pªG¿é¤J¤£¦s¦bªº¶g¦¸¡A«h°õ¦æ¨ì d=r.Find(czxm)     ¥X²{°õ¦æ¶¥¬q¿ù»~"91"¨S¦³³]©wª«¥óÅܼƩÎWITH°Ï¶ôÅܼơC
³o¦³°ÝÃD­C!

TOP

¦^´_ 5# olisun
On Error Resume Next
d = .Cells(.Range("A4:A").Find(czxm).Row, 1)  ³o¥y»yªk¿ù»~
¦]¬°§A¨Ï¥ÎOn Error Resume Next ©Ò¥H ´N©¿¦C³o¤@¿ù»~Ä~Äò°õ¦æ¤U¥h

TOP

¥i¬O¨S¦³¨º¤@¥y´N¥X²{¿ù»~400

TOP

¦^´_ 7# olisun

With Sheets("ªì¬Ý¥¼ÁÊ­ì¦]")  ¬õ¦rªº»yªk¿ù»~
    Set r = .Range("A4:A" .Range("A65536").End(xlUp).Row)
   On Error Resume Next
   d = .Cells(.Range("A4:A").Find(czxm).Row, 1)   =>À³Â²¤Æ¬°  d =r.Find(czxm)
  
³o¬O§A­nªº¶Ü?
With Sheets("ªì¬Ý¥¼ÁÊ­ì¦]")
    Set r = .Range("A4:A" & .Range("A65536").End(xlUp).Row)  ->­×¥¿«á
   On Error Resume Next
   d =r.Find(czxm)

TOP

§Úªº¦¡¤l¬O¦³&ªº¡A¥u¬O½Æ»s¨ì³o¤£¨£¤F
§Ú§Æ±æ¿é¤J¤£¦s¦bªº¶g¦¸·|¥X²{"µL¦¹¶g¦¸"³£¨S¦³°õ¦æ
MsgBox "µL¦¹¶g¦¸", 0

TOP

¦^´_ 9# olisun
With Sheets("ªì¬Ý¥¼ÁÊ­ì¦]")
    Set r = .Range("A4:A" & .Range("A65536").End(xlUp).Row) '
    '¤£­n¥Î¥¦On Error Resume Next
    If r.Find(czxm) Is Nothing Then
        MsgBox "µL¦¹¶g¦¸"
        Exit Sub
    End If
End With

TOP

        ÀR«ä¦Û¦b : ¤f»¡¦n¸Ü¡B¤ß·Q¦n·N¡B¨­¦æ¦n¨Æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD