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

[µo°Ý] ½ÐÀ°¤p§Ì°£¿ù...¬O¤£¯à³sÄò¥Îfind¨ç¼Æ¶Ü?!

[µo°Ý] ½ÐÀ°¤p§Ì°£¿ù...¬O¤£¯à³sÄò¥Îfind¨ç¼Æ¶Ü?!

¥»©«³Ì«á¥Ñ VBALearner ©ó 2016-8-15 16:55 ½s¿è

¤p§Ì§Ú·Q­n§ä¨â­Ó¥Ø¼ÐÀx¦s®æ¤Q¦r¥æ¿ùªºÀx¦s®æ­È
¦ý¤£ª¾¹D¿ù¦b­þ¸Ì...Áٽаª¤â½ç±Ð°£¿ù¡A·P¿E¤£ºÉ!
(´£¿ô¤@¤U:«DVBAµ{¦¡½Xªº¦^µª¡A¨Ò¦p¥Îª½±µ¦bworksheet¤W­±ªºÀx¦s®æ¥´index...³£¤£¬O§Ú·Q­nªºµª®×¡A¤j·§ªº¥Øªº¬O­n¯à¦b¦h­Ó¤u§@ªí¤¤ªº¸ê®Æ¸Ì¬d¦h­Ó¤£¦PÀx¦s®æªº­È¡A·PÁ¦U¦ì!)
  1. Sub test()

  2.     Dim rng1, rng2 As Range
  3.     ¸¹½X = CStr(Cells(3, 17).Value)
  4.     ¤é´Á = CStr(Cells(2, 18).Text)
  5.    
  6.     With Sheets(1)
  7.         .Activate
  8.         Set rng1 = .Range("A:A").Find(¸¹½X)
  9.         Set rng2 = .Range("A1:A20").Find(¤é´Á)
  10.         Cells(3, 18).Value = Cells(rng1.Row, rng2.Column).Value
  11.     End With
  12.    
  13. End Sub
½Æ»s¥N½X
·PÁ±zªº¨ó§U!.zip (14.26 KB)
¯u¤ß·PÁ¨C¤@¦ìÄ@·N¤À¨É©Ò¾Ç¡B«ü¾É·s¤âªº¤H!

¥»©«³Ì«á¥Ñ lpk187 ©ó 2016-8-15 17:46 ½s¿è

¦^´_ 1# VBALearner


    µ{¦¡¦³»~¤wÀ°§A­×¥¿¡A¤é´Á¥²¶·«Å§i¬°Date ¡AFind¤~·|§ä¨ì
À³¸Ó­n¾i¦¨«Å§iÅܼƪº²ßºD¡I
  1. Sub test()

  2.     Dim rng1 As Range, rng2 As Range
  3.     Dim ¤é´Á As Date
  4.     With Sheets(1)
  5.         ¸¹½X = .Cells(3, 18)
  6.         ¤é´Á = .Cells(2, 19)
  7.         '.Activate'³o¦æ¥i¥H¤£¥Î
  8.         Set rng1 = .Columns(1).Find(¸¹½X)
  9.         Set rng2 = .Rows(1).Find(¤é´Á, LookIn:=xlValues)
  10.         .Cells(3, 19) = .Cells(rng1.Row, rng2.Column).Value
  11.     End With
  12.    
  13. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# lpk187

O____O! ­ì¨Ó¬O³o¼Ë¤@­Ó¤p¿ù»~...·PÁÂlpk¤j¤@ª½¸Ñ¨M§Úªº°ÝÃDOwQ ·P¿E¤£ºÉ!
¯u¤ß·PÁ¨C¤@¦ìÄ@·N¤À¨É©Ò¾Ç¡B«ü¾É·s¤âªº¤H!

TOP

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