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

[µo°Ý] ¸ê®Æ¤ÀÃþ°ÝÃD¡C

[µo°Ý] ¸ê®Æ¤ÀÃþ°ÝÃD¡C

¤j®a¦n,§Ú·Q½Ð±Ð¦p¦ó¥ÎVBA °µ¥H¤U­n¨D¡C

¤U¹Ï AÄæ¬O§Ú¦b¥t¥~¤@­Ó¤u§@ªí¤¤½Æ»s¹L¨Óªº¸ê®Æ¡C

¦Ó§Ú»Ý­n±N¸ê®Æ¥ý¶i¦æ¤ÀÃþ,¦A¶i¦æ ­p¼Æ, Åã¥Ü¸ê®Æ¦³¦h¤Öµ§¡C

¦ý¨C­Ó¸ê®Æªºªøµu³£¤£¤@¼Ë¡C ¨Ò¦p BÄæ¬O§Ú¦Û¤v¤â°Ê©â¨ú¥X¨Óªº¸ê®Æ,

¤§«á­n¦A¥Î¼Ï¯Ã¤ÀªRªí¨ÓÁ`­p¥X²{¦h¤Öµ§¡C

§Ú¦Û¤v¦³­Ó·Qªk¬O ¨ú¦b¼Æ¦r«eªº­^¤å,¨Ò¦pAB123-01/ AB123-02/AB123 «h¨ú AB

¦ÓLEC123-01 «h¨úLEC, ¤§«á¦A¶}¤@­Ó·sªº¤u§@ªí,¦Ó1­Ó¤u§@ªí ©R¦W¬° AB, ¤@­Ó¤u§@ªí©R¦W¬° LEC,

¦A±N©Ò¦³ ¥]¬A AB ¶}ÀY©MLEC ¶}ÀYªº¸ê®Æ,¦Û°Ê·h¨ì ©ÒÄݤu§@ªí,§Ú¦A¥Î¤½¦¡¥h®³±¼³Ì«áªº3¦ì¼Æ,

¦A¨Ó¥Î¤ÀªRªí,¦ý¦³¤@¨Ç¬O ¨S¦³ - ¤§«áªºªF¦è, ³o­Ó§Ú´N¤£ª¾¹DÀ³¸Ó¦p¦ó¾Þ§@,¥d¦b³o¤F¡C

¦³¨S¦³¤°»ò¤èªk¥i¥H°µ¨ì®Ú¾ÚAÄæ¸ê®Æ, °µ¦¨BÄ檺¸ê®Æ.¦A¥Î¤ÀªRªí¦C¥X¨Ó©O,¤p§Ì¬O·s¤â,±æ½Ð¦U¦ì¤j­ô¥i¥HÀ°¦£¡C ¤Q¸U­Ó¸÷Á¡C

¸ê®Æ¤ÀÃþ.rar (13.66 KB)

¥u¬O­n²Î­p¤ÀÃþ¼Æ¶q, ¦ó¥²¤@¤@¥h·s¼W¤u§@ªí???

TOP

±Ä³vµ§¼g¤J, ³t«×¸ûºC:
Sub TEST()
Dim Sht As Worksheet, Arr, xD, i&, j%, T1$, T2$, U1&, U2&
Set Sht = ActiveSheet
Call §R°£¤ÀÃþ¤u§@ªí
Application.ScreenUpdating = False
Arr = Range([A1], Cells(Rows.Count, 1).End(xlUp))
Set xD = CreateObject("Scripting.Dictionary")
For i = 2 To UBound(Arr)
    T1 = Split(Arr(i, 1), "-")(0):  T2 = ""
    For j = 1 To Len(T1)
        If IsNumeric(Mid(T1, j, 1)) Then T2 = Left(T1, j - 1): Exit For
    Next j
    If T2 = "" Then GoTo 101
   
    If xD(T2) = 0 Then '«Ø¥ß·s¤ÀÃþ¤u§@ªí
       Sheets.Add(after:=Sheets(Sheets.Count)).Name = T2: Sht.Select: xD(T2) = 1
       Sheets(T2).[A1:E1] = Array("½s¸¹", "¼Æ¶q", "", "Á`¼Æ¶q", "=sum(B:B)")
    End If
   
    U1 = xD(T1 & "-V"): U2 = xD(T2)
    If U1 = 0 Then U2 = U2 + 1: U1 = U2: Sheets(T2).Cells(U1, 1) = T1 '·s¼W½s¸¹
    Sheets(T2).Cells(U1, 2) = Sheets(T2).Cells(U1, 2) + 1 '²Ö­p¼Æ¶q
   
    xD(T1 & "-V") = U1: xD(T2) = U2  'U1-[½s¸¹]ªº[¦C¦ì¸m], U2-[¤u§@ªí]³Ì«á¤@µ§[¦C¼Æ]
101: Next i
End Sub


Sub §R°£¤ÀÃþ¤u§@ªí()
Dim Sht As Worksheet
Application.DisplayAlerts = False
For Each Sht In Sheets
    If Sht.Name <> ActiveSheet.Name Then Sht.Delete
Next
End Sub

Xl0000410.rar (24.38 KB)


===============================

TOP

        ÀR«ä¦Û¦b : ¥Í®ð¡A´N¬O®³§O¤Hªº¹L¿ù¨ÓÃg»@¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD