- ©«¤l
- 967
- ¥DÃD
- 0
- ºëµØ
- 0
- ¿n¤À
- 1001
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN XP
- ³nÅ骩¥»
- OFFICE 2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-11-29
- ³Ì«áµn¿ý
- 2022-5-17
|
¥»©«³Ì«á¥Ñ register313 ©ó 2012-6-6 13:04 ½s¿è
¦^´_ 5# marklos - Sub 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½X- Sub 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
½Æ»s¥N½X |
|