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

[µo°Ý] §R°£¬¡­¶Ã¯¸ê®Æ´NµLªk°õ¦æVBA¡A¥X²{¨S¦³³]©wª«¥óÅܼƩÎWITH°Ï¶ôÅܼÆ

[µo°Ý] §R°£¬¡­¶Ã¯¸ê®Æ´NµLªk°õ¦æVBA¡A¥X²{¨S¦³³]©wª«¥óÅܼƩÎWITH°Ï¶ôÅܼÆ

¥»©«³Ì«á¥Ñ wiemanson ©ó 2010-7-22 17:40 ½s¿è

¦U¦ì«e½ú¦n¡I
§Ú¼g¤F¤@­Óµ{¦¡¡AµM«á¬¡­¶Ã¯ªº¸ê®Æ«h¬O§Ú¦Û¤v¥ý¶Ã¿é¤J®³¨Ó´ú¸Õµ{¦¡¬O§_¶¶§Q¥Îªº¡A´N¦b§Ú²×©ó¦¨¥\¶¶§Q°õ¦æ«á¡A¶×¤J¥¿¦¡­nºâªº¸ê®Æ¶i¥h¬¡­¶Ã¯¡A©~µM´NµLªk°õ¦æ¤F¡I
¤£ª¾¹D¬O¥X¤F¤°»ò°ÝÃD¡A«á¨Ó§Ú´N¦b¥Î§Ú­ì¥»´ú¸Õªº¬¡­¶Ã¯¸ê®Æ¦b¥h°õ¦æ¡Aµ²ªG¤S¥i¥H°õ¦æ¡AµM«á§Ú´N¤@ª½¸Õ¨ì©³¬O­þ¸Ì¥X¤F°ÝÃD¡Aµ²ªGµo²{¥u­n§Ú§R°£¨º´ú¸Õ¥Îªº¬¡­¶Ã¯¸ê®Æ¡A´N·|¶]¥X¨S¦³³]©wª«¥óÅܼƩÎWITH°Ï¶ôÅܼƪº¿ù»~µøµ¡¡I

§Úªºµ{¦¡¬O¼g¦bTHISBOOK¸Ì­±¡Aµ{¦¡½X¦p¤U©Ò¥Ü
Sub s1()
Worksheets("Sheet1").Select
  x = 1
   Do
      If Cells(x, 1) = "" Then Exit Do
        ElseIf Cells(x, 1) = Cells.Find(What:="ªL", After:=ActiveCell) And Cells(x, 3) = Cells.Find(What:="4", After:=ActiveCell) And Cells(x, 4) = "´¶³q" And Cells(x, 6) = "§_" Then
         Cells(x, 7) = 23 * Cells(x, 5)
        ElseIf Cells(x, 1) = Cells.Find(What:="ªL", After:=ActiveCell) And Cells(x, 4) = "¦n" And Cells(x, 6) = "§_" Then
         Cells(x, 7) = 20 * Cells(x, 5)
        ElseIf Cells(x, 1) = Cells.Find(What:="ªL", After:=ActiveCell) And Cells(x, 4) = "¤£¦n" And Cells(x, 5) <= 20 And Cells(x, 6) = "§_" Then
         Cells(x, 7) = 300
        ElseIf Cells(x, 1) = Cells.Find(What:="ªL", After:=ActiveCell) And Cells(x, 6) = "§_" And Cells(x, 4) = "¨ä¥¦" Then
        Cells(x, 7) = "¥t¥~ºâ"
        
        
        ElseIf Cells(x, 1) = Cells.Find(What:="¤O", After:=ActiveCell) And Cells(x, 4) = "¦n" And Cells(x, 6) = "§_" Then
         Cells(x, 7) = 10 * Cells(x, 5)
        ElseIf Cells(x, 1) = Cells.Find(What:="¤O", After:=ActiveCell) And Cells(x, 4) = "¤£¦n" And Cells(x, 6) = "§_" Then
         Cells(x, 7) = 2 * Cells(x, 5)
        ElseIf Cells(x, 1) = Cells.Find(What:="¤O", After:=ActiveCell) And Cells(x, 4) = "´¶³q" And Cells(x, 5) <= 20 And Cells(x, 6) = "§_" Then
         Cells(x, 7) = 300
        ElseIf Cells(x, 1) = Cells.Find(What:="¤O", After:=ActiveCell) And Cells(x, 6) = "§_" And Cells(x, 4) = "¨ä¥¦" Then
        Cells(x, 7) = "¥t¥~ºâ"
        
        
        End If
         
         
         
    x = x + 1
    Loop
                  
     
End Sub

§Ú¤]ª¦¤åª¦¤F«Ü¤[¡A¸Õ¹L¤F§âµ{¦¡½X¼g¦b¼Ò²Õ¸Ì­±¡Aµ²ªG¤]¤£¦æ¡I
½Ð°Ý§Ú­n«ç»ò¸Ñ¨M³o°ÝÃD©O¡I¡H
½Ð¦U¦ì«e½ú«ü¾É°g¬z¡I
ÁÂÁ¡I

¥»©«³Ì«á¥Ñ kimbal ©ó 2010-7-22 18:42 ½s¿è
¦U¦ì«e½ú¦n¡I
§Ú¼g¤F¤@­Óµ{¦¡¡AµM«á¬¡­¶Ã¯ªº¸ê®Æ«h¬O§Ú¦Û¤v¥ý¶Ã¿é¤J®³¨Ó´ú¸Õµ{¦¡¬O§_¶¶§Q¥Îªº¡A´N¦b§Ú²×©ó ...
wiemanson µoªí©ó 2010-7-22 17:37



sheet1¦pªG¨S¦³ ªL, ¤O, 4  ªº¤º®e´N·|¦º±¼

Cells.Find(What:="ªL", After:=ActiveCell) ³o¨Ç, ¦pªG§ä¤£¨ì®æ¤l, ´N·|¦^¶Çnothing
³o­Ó®É­Ô, if Cells(x, 1) = nothing then ´N·|¦º±¼
  1. Sub s1()
  2. Worksheets("Sheet1").Select
  3.   x = 1
  4.    Do
  5.       If Cells(x, 1) = "" Then
  6.         Exit Do
  7.       Else
  8.         y1 = Cells.Find(What:="ªL", After:=ActiveCell)
  9.         If y1 Is Nothing Then
  10.             y1s = "NOTHING"
  11.         Else
  12.             y1s = y1.Value
  13.         End If
  14.         y2 = Cells.Find(What:="4", After:=ActiveCell)
  15.         If y2 Is Nothing Then
  16.             y2s = "NOTHING"
  17.         Else
  18.             y2s = y2.Value
  19.         End If
  20.         y3 = Cells.Find(What:="¤O", After:=ActiveCell)
  21.         If y3 Is Nothing Then
  22.             y3s = "NOTHING"
  23.         Else
  24.             y3s = y3.Value
  25.         End If

  26.         
  27.         If Cells(x, 1) = y1s And Cells(x, 3) = y2s And Cells(x, 4) = "´¶³q" And Cells(x, 6) = "§_" Then
  28.          Cells(x, 7) = 23 * Cells(x, 5)
  29.         ElseIf Cells(x, 1) = y1s And Cells(x, 4) = "¦n" And Cells(x, 6) = "§_" Then
  30.          Cells(x, 7) = 20 * Cells(x, 5)
  31.         ElseIf Cells(x, 1) = y1s And Cells(x, 4) = "¤£¦n" And Cells(x, 5) <= 20 And Cells(x, 6) = "§_" Then
  32.          Cells(x, 7) = 300
  33.         ElseIf Cells(x, 1) = y1s And Cells(x, 6) = "§_" And Cells(x, 4) = "¨ä¥¦" Then
  34.         Cells(x, 7) = "¥t¥~ºâ"
  35.         ElseIf Cells(x, 1) = y3s And Cells(x, 4) = "¦n" And Cells(x, 6) = "§_" Then
  36.          Cells(x, 7) = 10 * Cells(x, 5)
  37.         ElseIf Cells(x, 1) = y3s And Cells(x, 4) = "¤£¦n" And Cells(x, 6) = "§_" Then
  38.          Cells(x, 7) = 2 * Cells(x, 5)
  39.         ElseIf Cells(x, 1) = y3s And Cells(x, 4) = "´¶³q" And Cells(x, 5) <= 20 And Cells(x, 6) = "§_" Then
  40.          Cells(x, 7) = 300
  41.         ElseIf Cells(x, 1) = y3s And Cells(x, 6) = "§_" And Cells(x, 4) = "¨ä¥¦" Then
  42.         Cells(x, 7) = "¥t¥~ºâ"
  43.         End If
  44.    
  45.          
  46.      End If
  47.          
  48.     x = x + 1
  49.     Loop
  50.                   
  51.      
  52. End Sub
½Æ»s¥N½X
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

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

TOP

¦^´_ 2# kimbal


  ¦ý¬O§Ú¥¿¦¡ªº¬¡­¶Ã¯¸ê®Æ¤¤¡A³£¦³§Ú¦bµ{¦¡¸Ì­±©Ò­n¤ñ¹ïªº¦r¤¸¡I¡I

§Úªº¸ê®Æªí¥D­n¬O§e²{³o¼Ë¡A¦X­p´N¬O§Ú©Ò¼gªºµ{¦¡©Ò­n­pºâ¥X¨Óªº¡I

«È¤á¦WºÙ¢x­«¶q¤½¤ç¢x¦X­p
¤@¤@¤@¤@¤@¤@¤@¤@¤@¤@¤@¤@¤@¤@
    ¤O        ¢x20        ¢x
    ¤O        ¢x53.8     ¢x
    ¤O        ¢x14        ¢x
    ªL        ¢x21        ¢x
    ªL        ¢x13        ¢x
   ¤O         ¢x10        ¢x

TOP

¦^´_  kimbal


  ¦ý¬O§Ú¥¿¦¡ªº¬¡­¶Ã¯¸ê®Æ¤¤¡A³£¦³§Ú¦bµ{¦¡¸Ì­±©Ò­n¤ñ¹ïªº¦r¤¸¡I¡I

§Úªº¸ê®Æªí¥D­n¬O ...
wiemanson µoªí©ó 2010-7-22 19:34



   ¥Î2¼Ó´£¨Ñªº¥N½X¨S°ÝÃD¶Ü?
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

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

TOP

¦^´_ 4# kimbal


    ¥ýÁÂÁ«e½ú¼ö¤ß«ü¾É¡A§Úª½±µ§âÀÉ®×¥á¤W¨Ó¦n¤F¡I

Book1.rar (9.1 KB)

TOP

¦^´_  kimbal


    ¥ýÁÂÁ«e½ú¼ö¤ß«ü¾É¡A§Úª½±µ§âÀÉ®×¥á¤W¨Ó¦n¤F¡I
wiemanson µoªí©ó 2010-7-22 21:16



   ¥¿¦p¤W­±©Ò»¡,¨S¦³ "¥h²B", ©Ò¥H¦º±¼°Õ~
¶K¤W³o­Ó¦A¸Õ¸Õ¹B¤@¤U
  1. Sub s1()

  2. Worksheets("Sheet1").Select
  3.   x = 1
  4.    Do
  5.       If Cells(x, 1) = "" Then
  6.         Exit Do
  7.         End If
  8.         Set y1 = Cells.Find(What:="¤T¸s", After:=ActiveCell)
  9.         If y1 Is Nothing Then
  10.             y1 = ""
  11.         End If
  12.         Set y2 = Cells.Find(What:="¥h²B", After:=ActiveCell)
  13.         If y2 Is Nothing Then
  14.             y2 = ""
  15.         End If
  16.         Set y3 = Cells.Find(What:="ª÷µo", After:=ActiveCell)
  17.         If y3 Is Nothing Then
  18.             y3 = ""
  19.         End If
  20.         Set y4 = Cells.Find(What:="«p", After:=ActiveCell)
  21.         If y4 Is Nothing Then
  22.             y4 = ""
  23.         End If
  24.         If Cells(x, 1) = y1 And Cells(x, 3) = y2 And Cells(x, 4) = "Âì" And Cells(x, 6) = "§_" Then
  25.          Cells(x, 7) = 11 * Cells(x, 5)
  26.         ElseIf Cells(x, 1) = y1 And Cells(x, 3) = y4 And Cells(x, 4) = "Âì" And Cells(x, 6) = "§_" Then
  27.          Cells(x, 7) = 2 * Cells(x, 5)
  28.         ElseIf Cells(x, 1) = y1 And Cells(x, 4) = "Âì" And Cells(x, 6) = "§_" Then
  29.          Cells(x, 7) = 5 * Cells(x, 5)
  30.         ElseIf Cells(x, 1) = y1 And Cells(x, 4) = "»Ì" And Cells(x, 6) = "§_" Then
  31.          Cells(x, 7) = 45 * Cells(x, 5)
  32.         ElseIf Cells(x, 1) = y1 And Cells(x, 4) = "«C»É" And Cells(x, 6) = "§_" Then
  33.          Cells(x, 7) = 12 * Cells(x, 5)
  34.         ElseIf Cells(x, 1) = y1 And Cells(x, 4) = "Âì" And Cells(x, 5) <= 20 And Cells(x, 6) = "§_" Then
  35.          Cells(x, 7) = "·r°u"
  36.         ElseIf Cells(x, 1) = y1 And Cells(x, 6) = "§_" And Cells(x, 4) = "¨ä¥¦" Then
  37.         Cells(x, 7) = "¥t¥~ºâ"
  38.    
  39.    
  40.         ElseIf Cells(x, 1) = y3 And Cells(x, 3) = Cells.Find(What:="(3mm)", After:=ActiveCell) And Cells(x, 4) = "Âì" And Cells(x, 6) = "§_" Then
  41.          Cells(x, 7) = "¤p¤ä"
  42.         ElseIf Cells(x, 1) = y3 And Cells(x, 4) = "Âì" And Cells(x, 6) = "§_" Then
  43.          Cells(x, 7) = 10 * Cells(x, 5)
  44.         ElseIf Cells(x, 1) = y3 And Cells(x, 4) = "»Ì" And Cells(x, 6) = "§_" Then
  45.          Cells(x, 7) = 2 * Cells(x, 5)
  46.         ElseIf Cells(x, 1) = y3 And Cells(x, 4) = "Âì" And Cells(x, 5) <= 20 And Cells(x, 6) = "§_" Then
  47.          Cells(x, 7) = 40
  48.         ElseIf Cells(x, 1) = y3 And Cells(x, 6) = "§_" And Cells(x, 4) = "¨ä¥¦" Then
  49.         Cells(x, 7) = "¥t¥~ºâ"
  50.         
  51.         Else
  52.             
  53.         Cells(x, 7) = 0

  54.      
  55.         End If
  56.          
  57.          
  58.          
  59.     x = x + 1
  60.     Loop

  61.   End Sub
½Æ»s¥N½X
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

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

TOP

¥i¥H¤F¡IÁÂÁ«e½ú¸Ñµª¡I
¯uªº¶W¶}¤ßªº¡I

TOP

        ÀR«ä¦Û¦b : §g¤l¬°¥Ø¼Ð¡A¤p¤H¬°¥Øªº¡C
ªð¦^¦Cªí ¤W¤@¥DÃD