| ©«¤l967 ¥DÃD0 ºëµØ0 ¿n¤À1001 ÂI¦W0  §@·~¨t²ÎWIN XP ³nÅ骩¥»OFFICE 2003 ¾\ŪÅv50 ©Ê§O¨k ¨Ó¦Û¥x¥_ µù¥U®É¶¡2010-11-29 ³Ì«áµn¿ý2022-5-17 
  
 | 
                
| ¥»©«³Ì«á¥Ñ register313 ©ó 2012-6-6 13:04 ½s¿è 
 ¦^´_ 5# marklos
 ½Æ»s¥N½XSub xx()
Sheets("sheet1").Cells.Copy Sheets("sheet2").[A1]
Sheets("sheet2").Select
For d = [A1].End(xlDown).Row To 2 Step -1
  c = Application.CountA(Cells(d, 4).Resize(1, 2))
  If Cells(d, 4) <> "" Then
     Rows(d).Copy
     Rows(d + 1).Resize(c).Insert Shift:=xlDown
     Cells(d + 1, 3).Resize(c, 1) = Application.Transpose(Cells(d, 4).Resize(1, 2))
  End If
Next d
Columns("d:e").Delete
End Sub
½Æ»s¥N½XSub yy()
Set d = CreateObject("scripting.dictionary")
With Sheets("sheet1")
  For i = 2 To .[A1].End(xlDown).Row
    Ar = .Range(.Cells(i, "A"), .Cells(i, "K"))
    d(.Cells(i, 3).Value) = Ar
    For j = 4 To 5
      If .Cells(i, j) <> "" Then
        Ar(1, 3) = .Cells(i, j)
        d(.Cells(i, j).Value) = Ar
      End If
    Next j
  Next i
End With
With Sheets("sheet2")
  .Cells = ""
  Sheets("sheet1").Rows(1).Copy .[A1]
  .[A2].Resize(d.Count, 11) = Application.Transpose(Application.Transpose(d.items))
  .Columns("D:E").Delete
  .[A1].CurrentRegion.Borders.LineStyle = xlContinuous
End With
End Sub
 | 
 |