½Ð°Ý¦p¦ó¥ÎVBA.¦Û°Ê¦X¨ÖÀx¦s®æ"¸ó¦C¸m¤¤"
- ©«¤l
- 472
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 485
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows
- ³nÅ骩¥»
- MS Office
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- »´ä
- µù¥U®É¶¡
- 2010-7-4
- ³Ì«áµn¿ý
- 2014-12-28

|
- Sub test()
- Dim lngRowCount As Long
- Dim lngRowCounter As Long
- Dim lngRowCountLast As Long
-
- lngRowCount = Range("C1").End(xlDown).Row
-
- If lngRowCount = 2 Then Exit Sub
- lngRowCountLast = 1
-
-
- For lngRowCounter = 2 To lngRowCount - 1
- With Range("A1")
- If lngRowCounter = lngRowCount - 1 And Not (lngRowCountLast = lngRowCounter - 1) Then
- Range(.Offset(lngRowCountLast), .Offset(lngRowCounter)).Merge
- Range(.Offset(lngRowCountLast, 1), .Offset(lngRowCounter, 1)).Merge
- End If
- If .Offset(lngRowCounter) <> "" Then
- If Not (lngRowCountLast = lngRowCounter - 1) Then
- Range(.Offset(lngRowCountLast), .Offset(lngRowCounter - 1)).Merge
- Range(.Offset(lngRowCountLast, 1), .Offset(lngRowCounter - 1, 1)).Merge
- End If
- lngRowCountLast = lngRowCounter
- End If
- End With
- Next
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|