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

¤£¦P¤u§@ªí¤ºªº¸ê®Æ¤ñ¹ï»P¶ñ¤J.

¤£¦P¤u§@ªí¤ºªº¸ê®Æ¤ñ¹ï»P¶ñ¤J.

¥»©«³Ì«á¥Ñ MRSA ©ó 2011-1-9 17:41 ½s¿è

Worksheet 1:
¡@¡@¡@A¡@¡@¡@B¡@¡@¡@C
1¡@¡@12¡@¡@aaa¡@¡@high
2¡@¡@84¡@¡@daw¡@¡@light
3¡@¡@28¡@¡@add¡@¡@done

Worksheet 2:
¡@¡@¡@A¡@¡@¡@B
1¡@¡@28¡@¡@sale
2¡@¡@45¡@¡@lock
3¡@¡@84¡@¡@lock

§Ú·Q¨Ì·Ó¨â­Ó¤u§@ªí¤¤ªºAÄæ¦ì¤ºªº¼Æ­È¤ñ¹ï¥XWorksheet 2¸ÌBÄæ¦ìªº­È¡A¨Ã¶ñ¦ÜWorksheet 1 ªºDÄæ¦ì¤º¡A­YWorksheet 2¤º¨S¦³Worksheet 1¸ÌAÄæ¦ì¤ºªº¼Æ¸ê¡A«hDÄæ¦ìÅã¥ÜªÅ¥Õ¡C
°õ¦æµ²ªG¦p¤U¡G
Worksheet 1:
¡@¡@¡@A¡@¡@¡@B¡@¡@¡@C¡@¡@¡@D
1¡@¡@12¡@¡@aaa¡@¡@high¡@¡@
2¡@¡@84¡@¡@daw¡@¡@light¡@¡@lock
3¡@¡@28¡@¡@add¡@¡@done¡@¡@sale

½Ð°Ý§Ú¸Ó«ç»ò¼g»yªk?
§Ú¥Î¨ç¼Ævlookup¼gªº®É­Ô¡A¥u­n¦bworksheet 2¸Ì§ä¤£¨ì¸ê®Æ®É¡Avba´N¥d¦í¤F¡C

¦^´_ 16# zyzzyva


ÁÂÁ§A~¨S¨Æ¤F
¦]¬°¬Q¤Ñ¦A´ú¸Õ®É¤@ª½¥X°ÝÃD

¤wok  Thank you~

TOP

¦^´_ 15# Changbanana
³o¤£¬O¸ò­ìpo¤@¼Ëªº°ÝÃD¶Ü¡A§Ú¥ÎHsiehª©¤jªºcode´ú¸Õ¥i¥Hªü¡H

TOP

¦^´_ 10# Hsieh

·Q½Ð°Ý
¦pªG¸ê®Æ«¬ºA¬O"ªí®æ"ªº®É­Ô
¸Ó«ç»ò§ï¼g©O

½d¨Ò:
¦b¤u§@ªí¤@ªºAÄæNO.¹ïÀ³¨ì¤u§@ªí¤GªºAÄænumber
³æ¸¹¤@¼Ëªº®É­Ô
±q¤u§@ªí¤GªºBÄ檺¸ê®Æ¶Ç¦^¤u§@ªí¤@ªºIÄæ
¤u§@ªí1

¤u§@ªí2
2.png
­Y»Ý­nÀÉ®×´ú¸Õ: ¬¡­¶Ã¯1.zip (382.28 KB)

TOP

¦^´_ 12# GBKEE

·PÁª©¥D¤j¤jªº¦^´_
ASUS

TOP

¦^´_ 8# linshin1999
:)   ¥¿½T
³o³¡¥÷Ãö«Y¨ìµ{¦¡³t«×»P¥¿½T©Ê­nµy¼ô½Æ²ß¤@¤U·|¸û¶¶

TOP

With Sheets(2)¤¤ªºEnd With¬°¦ó©ñ¨ì³Ì©³¤U©O?
¥i¥H©ñ¦bWith Sheets(1)¤§«e¶Ü?asus103 µoªí©ó 2011-1-10 08:15

¥i¥Hªº
With Sheets(2)¤¤ªºEnd With¼g¦bWith Sheets(1)¤§«e ¨Ã¤£¼vÅT¾ã­Óµ{¦¡µ²ºc

TOP

¦^´_ 10# Hsieh
Hsieh¤j¤j
¨C¤@¦¸¬Ý¨ì±z¹ïdictionary¨Ï¥Îªº¥X¯«¤J¤Æ¡AÁ`¬O§Ô¤£¦íÆg¹Ä
¦³¤@¬O½Ð±Ð
With Sheets(2)¤¤ªºEnd With¬°¦ó©ñ¨ì³Ì©³¤U©O?
¥i¥H©ñ¦bWith Sheets(1)¤§«e¶Ü?
ASUS

TOP

¦^´_ 1# MRSA
  1. Sub Ex()
  2. Set d = CreateObject("Scripting.Dictionary")
  3. With Sheets(2)
  4. For Each a In .Range(.[A1], .[A65536].End(xlUp))
  5.    d(a.Value) = a.Offset(, 1)
  6. Next
  7. With Sheets(1)
  8. For Each a In .Range(.[A1], .[A65536].End(xlUp))
  9.    a.Offset(, 3) = d(a.Value)
  10. Next
  11. End With
  12. End With
  13. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 6# linshin1999


            2).For Each E In Sheet1.Range("A:A").SpecialCells(xlCellTypeConstants)
            ¤¤¦pªG¥u³o¼Ë¼g  Sheet1.range("A:A")  ©M  Sheet1.Range("A:A").SpecialCells(xlCellTypeConstants) ªº®t§O¦b¨º¸Ì? ¤£¬O³£·|±½´y¤@¹M¶Ü?
³o¬O¤£¦Pªº¡ASpecialCells(xlCellTypeConstants)¬O±`¼ÆÀx¦s®æ¡A¤]´N¬O·|²¤¹LªÅ®æ¡C§A¥Î¿ý»s¥¨¶°¤è¦¡¡A¿ï¨úAÄæ/±`¥Î/´M§ä»P¨ú¥N/¯S®í/±`¼Æ¬Ý¬Ýµ{¦¡½X´Nª¾¹D
        3).I = Application.Match(E, Sheet2.Range("A:A"), 0)
            ³o¼Ë¤@¦æ³o·|¦bSheet2.Range("A:A")±½´y¥X¬Ûµ¥ªº¸ê¶Ü?
³o¬O§Q¥Î¤u§@ªí¨ç¼ÆMATCH§ä¨ì¹ïÀ³¦ì¸m¡A­Y¨S§ä¨ì¥¿½T¸ê®Æ·|¶Ç¦^¿ù»~´Ó
        4.)If IsNumeric(I) Then E.End(xlToRight).Offset(, 1) = Sheet2.Cells(I, "B")
            ¬°¤°»ò­n§@°µ  IsNumeric(I) ³o­Ó°Ê§@ ©O?
¦pªG Application.Match(E, Sheet2.Range("A:A"), 0)¯à§ä¨ì¹ïÀ³­È¡Aªí¥ÜI·J¬O­Óªø¾ã¼Æ¡A©Ò¥H¬O¼Æ­È¡A¨S§ä¨ì´NÀ³¬O¿ù»~´Ó¡A¥i¥ÎISERROR¨ç¼Æ´ú¸Õ¡C
±z¹ïEXCEL VBAªº¼ö§Õ¡A¤p§Ì¤Q¤À·q¨Ø¡A¤£¹L¦b¦¹´£¿ô±z¡AVBAÁÙ¬O­n¥ÑEXCEL°ò¥»¾Þ§@¤Î¥\¯àµÛ¤â¡A¤~¯à¨Æ¥b¥\­¿¡C
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : §Ú­Ì³Ì¤jªº¼Ä¤H¤£¬O§O¤H¡D¥i¯à¬O¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD