- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 44
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2025-2-20
               
|
¦^´_ 3# Genie - Sub ex()
- Application.ScreenUpdating = False
- Set d = CreateObject("Scripting.Dictionary")
- With Sheet1
- For Each a In .Range(.[A2], .[A2].End(xlDown))
- mystr = Join(Application.Transpose(Application.Transpose(a.Offset(, 1).Resize(, 3))), ";")
- If d(a.Value) = "" Then
- d(a.Value) = mystr
- Else
- d(a.Value) = d(a.Value) & Chr(10) & mystr
- End If
- Next
- End With
- With Sheet2
- For Each pic In .Pictures
- Set a = pic.TopLeftCell.Offset(-1, 0)
- If d.exists(a.Value) = True Then
- r = a.Offset(23).Row
- Do While .Cells(r, "B") <> "" Or .Cells(r, "F") <> ""
- a.Offset(23).EntireRow.Delete
- Loop
- ar = Split(d(.Cells(a.Row, "B").Value), Chr(10))
- ar1 = Split(d(.Cells(a.Row, "F").Value), Chr(10))
- a.Offset(23).Resize(Application.Max(UBound(ar), UBound(ar1)) + 1, 1).EntireRow.Insert
- For i = 2 To 6 Step 4
- ay = Split(d(.Cells(a.Row, i).Value), Chr(10))
- For j = 0 To UBound(ay)
- For x = 0 To 2
- If x = 0 Then
- .Cells(a.Row, i + x).Offset(23 + j) = Split(ay(j), ";")(x)
- Else
- .Cells(a.Row, i + x).Offset(23 + j) = Round(Val(Split(ay(j), ";")(x)), 1)
- End If
- Next
- Next
- d.Remove .Cells(a.Row, i).Value
- Next
- End If
- Next
- End With
- Application.ScreenUpdating = True
- End Sub
½Æ»s¥N½X |
|