- ©«¤l
- 1446
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1470
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-10-21
|
¦^´_ 1# aassddff736
ÁÂÁ«e½úµoªí¦¹¥DÃD»P½d¨Ò
«á¾ÇÂǦ¹©«½m²ß°}¦C,¾Ç²ß¤è®×¦p¤U,½Ð«e½ú°Ñ¦Ò
"±Æ¦¨"ªí °õ¦æ«e:
"±Æ¦¨"ªí °õ¦æµ²ªG:
Option Explicit
Sub ¾ã²zªí·J¾ã¬°±Æ¦¨ªí()
Dim Brr, Crr, i&, R&, xU As Range, xS As Worksheet
Set xS = Sheets("¾ã²z")
[±Æ¦¨!A1].CurrentRegion.Offset(1).EntireRow.Delete
Brr = Range(xS.[F2], xS.[A65536])
ReDim Crr(1 To UBound(Brr), 1 To 4)
For i = 1 To UBound(Brr)
If Trim(Brr(i, 3)) = "" Then GoTo i01 Else R = R + 1
If Trim(Brr(i, 6)) <> "" Then
If xU Is Nothing Then
Set xU = Sheets("±Æ¦¨").Cells(R + 1, 3)
Else
Set xU = Union(xU, Sheets("±Æ¦¨").Cells(R + 1, 3))
End If
End If
Crr(R, 1) = Trim(Brr(i, 2))
Crr(R, 2) = Trim(Brr(i, 3))
Crr(R, 3) = Trim(Brr(i, 4)) & vbCrLf & Trim(Brr(i, 6))
Crr(R, 4) = Val(Brr(i, 5))
i01: Next
If R = 0 Then MsgBox "¨S¦³¸ê®Æ": Exit Sub
With [±Æ¦¨!A2].Resize(R, 4)
.Value = Crr
.Borders.LineStyle = xlContinuous
End With
If Not xU Is Nothing Then xU.Font.ColorIndex = 3
End Sub |
|