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

¦p¦ó±q¦r¦ê¤¤¤ñ¹ï«á§ì¥X»Ý¨Dªº¸ê®Æ

¦p¦ó±q¦r¦ê¤¤¤ñ¹ï«á§ì¥X»Ý¨Dªº¸ê®Æ

¦p¦ó±NLÄæ¦ì¦r¦ê»P¤u§@ªí"­û¤u¦W³æ"¤ñ¹ï¡A
¤ñ¹ï¨ì¬Û¦Pªº¦W¦r§ì¨ìAIÄæ¦ì
°ÝÃD¦pªþ¥ó

2012-01_DMS·~¥NÁÒ°Ï.zip (322.66 KB)

´ú¸ÕOK~~·PÁ±zªº¨ó§U

TOP

¦^´_ 7# lone_tiger0303
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Ar(), xR As String, xF As Range, xS As Integer
  4.     With Sheets("DMS")
  5.         Ar = .Range("L2", .[L2].End(xlDown)).Value
  6.         For xS = 1 To UBound(Ar)
  7.             xR = Split(Ar(xS, 1), ",")(0)
  8.             Set xF = Sheets("­û¤u¦W³æ").Cells.Find(xR, lookat:=xlWhole)
  9.             If Not xF Is Nothing Then
  10.                 Ar(xS, 1) = xF
  11.             Else
  12.                 Ar(xS, 1) = ""
  13.             End If
  14.         Next
  15.         .Range("AI2:AI" & Rows.Count) = ""
  16.         .[AI2].Resize(UBound(Ar)) = Ar
  17.    End With
  18. End Sub
½Æ»s¥N½X

TOP

GBKEE¦Ñ®v~~½d¨Ò¦pªþ¥ó

2012-01_DMS·~¥NÁÒ°Ï.zip (286.5 KB)

TOP

¦^´_ 5# lone_tiger0303
¤@¹ï¤@~~­«½Æªº¦W³æ¤£¥Î§R°£¡A¥B¤£¥Î©¹¤W²¾
°µ­Ó½d¨Ò»¡©ú¤@¤U

TOP

·PÁ¤T¦ì¦Ñ®vªº«ü¾É~~
¥t¥~¡AGBKEE¦Ñ®v~~§Ú­n¤@¹ï¤@~~­«½Æªº¦W³æ¤£¥Î§R°£¡A¥B¤£¥Î©¹¤W²¾

TOP

¦^´_ 1# lone_tiger0303
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Ar, xA, xF As Range, xS As Integer
  4.     With Sheets("DMS")
  5.         Ar = Application.Transpose(.Range("L1", .[L1].End(xlDown)).Value)
  6.         Ar = Join(Ar, ",")
  7.         Ar = Split(Ar, ",")
  8.         With .Range("IR1")
  9.             .Resize(UBound(Ar)) = Application.Transpose(Ar)
  10.             .Resize(UBound(Ar)).Offset(, 1) = 1
  11.             xA = .Resize(UBound(Ar)).Resize(, 2).Address(, , 0)
  12.             .Offset(, 2).Consolidate xA, xlSum, 0, 1                 '·Jºâ¥X¤£­«½Æªº¦W³æ
  13.             Erase Ar
  14.             For Each xA In .Offset(, 2).Resize(Rows.Count, 1).SpecialCells(xlCellTypeConstants)
  15.                 If xA.Row <> 1 And xA <> "" Then
  16.                     Set xF = Sheets("­û¤u¦W³æ").Cells.Find(xA, lookat:=xlWhole)
  17.                     If Not xF Is Nothing Then
  18.                         ReDim Preserve Ar(xS)
  19.                         Ar(xS) = xA
  20.                         xS = xS + 1
  21.                     End If
  22.                 End If
  23.             Next
  24.             .CurrentRegion = ""
  25.         End With
  26.         If xS > 0 Then
  27.             .Range("AI2:AI" & Rows.Count) = ""
  28.             .Range("AI2").Resize(xS).Value = Application.Transpose(Ar)
  29.         End If
  30.    End With
  31. End Sub
½Æ»s¥N½X

TOP

¦^´_ 1# lone_tiger0303
  1. Sub nn()
  2. With Sheets("DMS")
  3. For Each a In .Range("L2", .[L2].End(xlDown))
  4. .Cells(a.Row, "AI") = ""
  5.   ar = Split(a, ",")
  6.   For Each b In ar
  7.   Set c = Sheets("­û¤u¦W³æ").Cells.Find(b, lookat:=xlWhole)
  8.      If Not c Is Nothing Then .Cells(a.Row, "AI") = IIf(.Cells(a.Row, "AI") = "", c, .Cells(a.Row, "AI") & "," & c)
  9.   Next
  10. Next
  11. End With
  12. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 1# lone_tiger0303

¸ê®Æ¶q¤j °õ¦æ¸û¶g
  1. Sub zz()
  2. Application.ScreenUpdating = False
  3. Dim Rng As Range, Ar
  4. Set Rng = Sheets("DMS").[L2]
  5. Range(Rng, [L65536].End(xlUp)).Offset(0, 23) = ""
  6. Do
  7.   If InStr(Rng, ",") Then
  8.      Ar = Split(Rng, ",")
  9.      For I = 0 To UBound(Ar)
  10.        Set X = Sheets("­û¤u¦W³æ").UsedRange.Find(Ar(I), , xlValues, xlWhole)
  11.        If Not X Is Nothing Then
  12.           Rng.Offset(0, 23) = Rng.Offset(0, 23) & X & " "
  13.        End If
  14.      Next I
  15.   Else
  16.        Set X = Sheets("­û¤u¦W³æ").Cells.Find(Rng, , xlValues, xlWhole)
  17.        If Not X Is Nothing Then
  18.           Rng.Offset(0, 23) = Rng
  19.        End If
  20.   End If
  21.   Set Rng = Rng.Offset(1)
  22. Loop Until Rng(1) = ""
  23. Application.ScreenUpdating = True
  24. End Sub
½Æ»s¥N½X
2012-01_DMS·~¥NÁÒ°Ï.rar (76.38 KB)

TOP

        ÀR«ä¦Û¦b : ®É®É¦n¤ß´N¬O®É®É¦n¤é¡C
ªð¦^¦Cªí ¤W¤@¥DÃD