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

[µo°Ý] ¸ê®Æ®w¨ú¤£­«Âиê®Æ¤è¦¡½Ð±Ð

[µo°Ý] ¸ê®Æ®w¨ú¤£­«Âиê®Æ¤è¦¡½Ð±Ð

DEAR ALL ¤j¤j-
1.¦p¹Ï¤@¸ê®Æ®w©óSHEET1¤¤
2.­ì«h: ­n§ì¨úSHEET1¤£­«Âиê®Æ¦ÜSHEET2¤¤
2.1 «e6½X¬Û¦Pºâ­«ÂÐ.§ì¨ú¤£­«Âиê®Æ¦ÜSHEET2¤¤.µ²ªG¦p¹Ï¤G
3.½Ð±Ð¦p¦ó¤U VBA »yªk??·Ð¤£§[½ç±Ð THANKS*10000
¹Ï¤@ ¸ê®Æ®w
SHEET1
A1=½s¸¹        B1=¶µ¥Ø   
A2=A12345A     B2=1
A3=B12345B     B3=2
A4=B12345*     B4=3
A5=A12345      B5=4
A6=B12345      B6=5
¹Ï¤G µ²ªG
SHEET2
A1=½s¸¹        B1=¶µ¥Ø   
A2=A12345        B2=4
A3=B12345        B3=5
ù

Sub ex1()
    Arr = Sheet1.Range("A1").CurrentRegion
    Set d = CreateObject("Scripting.Dictionary")
    For i = 1 To UBound(Arr)
        d(Left(Arr(i, 1), 6)) = Arr(i, 2)
    Next
    Sheet2.[A1:B65536].ClearContents
    Sheet2.[A1].Resize(d.Count, 2) = Application.Transpose(Array(d.keys, d.items))
End Sub
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

DEAR ML089 ¤j¤j
100%²Å¦X»Ý¨D.THANKS*10000
ù

TOP

DEAR ¤j¤j
  ¦p¤U.­ìA.BÄæ¸ê®ÆÂà´« ­n§ï¬° A-FÄæ¸ê®ÆÂà´«
  ¬°¦ó Sheet2.[A1].Resize(d.Count, 2) §ï Sheet2.[A1].Resize(d.Count, 6)
   «á C.D.E.FÄæ¸ê®Æ³£¥X²{ N/A ·Ð¤£§[½ç±Ð  THANKS  

Sub AA()
    Arr = Sheet1.Range("A1").CurrentRegion
    Set d = CreateObject("Scripting.Dictionary")
    For i = 1 To UBound(Arr)
        d(Left(Arr(i, 1), 6)) = Arr(i, 2)
    Next
    Sheet2.[A1:F65536].ClearContents
    Sheet2.[A1].Resize(d.Count, 6) = Application.Transpose(Array(d.keys, d.items))
End Sub
ù

TOP

¦^´_ 4# rouber590324
­n¸ß°Ý¡A½Ð©ó°ÝÃD¤U¤è«ö¦^ÂÐÁä

¨úA-FÄæ¸ê®Æ
Sub ex2()
    Arr = Sheet1.Range("A1").CurrentRegion
    Set d = CreateObject("Scripting.Dictionary")
    For i = 1 To UBound(Arr)
        d(Left(Arr(i, 1), 6)) = Array(Arr(i, 1), Arr(i, 2), Arr(i, 3), Arr(i, 4), Arr(i, 5), Arr(i, 6))
    Next
    Sheet2.[A1:F65536].ClearContents
    Sheet2.[A1].Resize(d.Count, 6) = Application.Transpose(Application.Transpose(d.items))
End Sub
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

google"EXCEL°g"  blog  ©Îgoogleºô§}:https://hcm19522.blogspot.com/

TOP

DEAR ML089 ¤j¤j
100%²Å¦X»Ý¨D.THANKS*10000

DEAR  hcm19522  ¤j¤j
·PÁ´£¨Ñ°Ñ¦Ò¸ê®Æ THANKS*10000
ù

TOP

        ÀR«ä¦Û¦b : ¤@¥y·Å·xªº¸Ü¡A´N¹³©¹§O¤H¨­¤WÅx­»¤ô¡A¦Û¤v·|ªg¨ì¨â¤Tºw¡C
ªð¦^¦Cªí ¤W¤@¥DÃD