- ©«¤l
- 97
- ¥DÃD
- 33
- ºëµØ
- 0
- ¿n¤À
- 129
- ÂI¦W
- 0
- §@·~¨t²Î
- Win 7
- ³nÅ骩¥»
- office 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2019-5-7
- ³Ì«áµn¿ý
- 2022-8-25
|
¦^´_ 4# zheng211016
ÁÂÁÂ~§Ú¤w¸g§ä¨ì¤èªk¤F- Sub test()
- Dim temp(10)
- Dim Meg As Boolean
- Sheets("¤u§@ªí1").Select
- Sheets("¤u§@ªí1").Range("A8").Select
- 'Ū¨úsheet1¿z¿ïªº¸ê®Æ¨Ã¼g¤Jsheet2................
- K = 12
- Do
- ActiveCell.Offset(1).Select '¬¡°Ê³æ®æ¤U²¾¤@¦æ
- Meg = ActiveCell.MergeCells
-
- If ActiveCell.Rows.Hidden = False And ActiveCell.Value <> "" And Meg = False Then
- temp(1) = ActiveCell.Value
- temp(2) = ActiveCell.Offset(0, 1).Value
- temp(3) = ActiveCell.Offset(0, 4).Value
- Sheets("¤u§@ªí2").Cells(K + 1, 1) = temp(1)
- Sheets("¤u§@ªí2").Cells(K + 1, 2) = temp(2) & Chr(10) & temp(3)
- K = K + 5
- End If
- Loop Until ActiveCell = "" Or Meg = True
-
- '¾ã²zsheet2 ®æ¦¡................
- K = 12
- With Sheets("¤u§@ªí2")
- Do
- If .Cells(K + 1, 1) <> "" Then
- .Range(.Cells(K + 1, 1), .Cells(K + 5, 1)).Merge
- .Range(.Cells(K + 1, 2), .Cells(K + 5, 2)).Merge
- K = K + 5
- Else
- Exit Sub
- End If
- Loop
- End With
-
- End Sub
½Æ»s¥N½X |
|