½Ð°Ý¦Û°Ê´«¦æ®æ¦¡n¦p¦ó©î¤À¨â¦æ ¤½¦¡¤ÎVBA°µªk?
- ©«¤l
- 70
- ¥DÃD
- 9
- ºëµØ
- 0
- ¿n¤À
- 83
- ÂI¦W
- 27
- §@·~¨t²Î
- win
- ³nÅ骩¥»
- 7
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2024-2-3
- ³Ì«áµn¿ý
- 2024-11-16
|
½Ð°Ý¦Û°Ê´«¦æ®æ¦¡n¦p¦ó©î¤À¨â¦æ ¤½¦¡¤ÎVBA°µªk?
½Ð°Ý¦Û°Ê´«¦æ®æ¦¡n¦p¦ó©î¤À¨â¦æ ¤½¦¡¤ÎVBA°µªk?
¦p¦ó§âA1Äæ²Ä¤@±Æ©ñB1Äæ¨ä¸ê®Æ©ñC1 |
|
|
|
|
|
|
- ©«¤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
"¾ã²z"ªí °õ¦æ«e:
"¾ã²z"ªí °õ¦æµ²ªG:
Option Explicit
Sub ±Æ¦¨ªí·J¾ã¬°¾ã²zªí()
Dim Brr, Crr, i&, R&, xU As Range, xS As Worksheet
Set xS = Sheets("±Æ¦¨")
[¾ã²z!A1].CurrentRegion.Offset(1).EntireRow.Delete
Brr = Range(xS.[D2], xS.[A65536])
ReDim Crr(1 To UBound(Brr), 1 To 6)
For i = 1 To UBound(Brr)
If Trim(Brr(i, 2)) = "" Then GoTo i01 Else R = R + 1
If InStr(Brr(i, 3), vbLf) Then
If xU Is Nothing Then
Set xU = Sheets("¾ã²z").Cells(R + 1, 6)
Else
Set xU = Union(xU, Sheets("¾ã²z").Cells(R + 1, 6))
End If
End If
Crr(R, 1) = R
Crr(R, 2) = Trim(Brr(i, 1))
Crr(R, 3) = Trim(Brr(i, 2))
Crr(R, 4) = Trim(Split(Brr(i, 3) & vbLf, vbLf)(0))
Crr(R, 5) = Val(Brr(i, 4))
Crr(R, 6) = Mid(Trim(Brr(i, 3)), InStr(Trim(Brr(i, 3)), vbLf) + 1)
i01: Next
If R = 0 Then MsgBox "¨S¦³¸ê®Æ": Exit Sub
With [¾ã²z!A2].Resize(R, 6)
.Value = Crr
.Borders.LineStyle = xlContinuous
End With
If Not xU Is Nothing Then xU.Font.ColorIndex = 3
End Sub |
|
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y
|
|
|
|
|
- ©«¤l
- 70
- ¥DÃD
- 9
- ºëµØ
- 0
- ¿n¤À
- 83
- ÂI¦W
- 27
- §@·~¨t²Î
- win
- ³nÅ骩¥»
- 7
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2024-2-3
- ³Ì«áµn¿ý
- 2024-11-16
|
¦^´_ 2# Andy2483
¯uªº«Ü·PÁ±z |
|
|
|
|
|
|
- ©«¤l
- 70
- ¥DÃD
- 9
- ºëµØ
- 0
- ¿n¤À
- 83
- ÂI¦W
- 27
- §@·~¨t²Î
- win
- ³nÅ骩¥»
- 7
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2024-2-3
- ³Ì«áµn¿ý
- 2024-11-16
|
¦^´_ 2# Andy2483
½Ð±Ð¤@¤U~
1.FÄæ¶Â¦â¦rÅé·QÅܦ¨ªÅ¥Õ¦p¦ó°µ?
ÀËÅç°O¿ýªí-A4--test.zip (33.95 KB)
2.§Ú·Q¼W¥[¸ê®Æ¶µ¥Ø¦p§ó§ï?
3.§Ú·Q¤@¦¸©Ê¦C¦L «ç»ò§â¸ê®Æ±a¶iSHEET("°O¿ýªí")¤º |
|
|
|
|
|
|
- ©«¤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
|
¦^´_ Andy2483
¯uªº«Ü·PÁ±z
aassddff736 µoªí©ó 2024-2-26 11:35
Option Explicit
Sub ±Æ¦¨ªí·J¾ã¬°¾ã²zªí()
Dim Brr, Crr, i&, R&, xU As Range, xS As Worksheet
Set xS = Sheets("±Æµ{")
'¡ô¥OxSÅܼƬO "±Æµ{"¤u§@ªí
[¾ã²z!A1].CurrentRegion.Offset(1).EntireRow.Delete
'¡ô¥O"¾ã²z"ªí¯d¤U¼ÐÃD¦C,¨ä¥¦¦C§R°£
Brr = Range(xS.[D2], xS.[A65536])
'¡ô¥OBrrÅܼƬO¤Gºû°}¦C,¥HÀx¦s®æȱa¤J°}¦C¤¤
ReDim Crr(1 To UBound(Brr), 1 To 6)
'¡ô«Å§iCrrÅܼƬO¤GºûªÅ°}¦C,«Å§i¤W¤U ¥ª¥k½d³ò
For i = 1 To UBound(Brr)
'¡ô³]¶¶°j°é!i±q1¨ì Brr°}¦C³Ì¤j¯Á¤Þ¦C¸¹
If Trim(Brr(i, 2)) = "" Then GoTo i01 Else R = R + 1
'¡ô¦pªGÃöÁäÄæªÅ®æ´N²¤¹L,§_«h´N¥ORÅܼƲ֥[1
Crr(R, 1) = R
Crr(R, 2) = Trim(Brr(i, 1))
Crr(R, 3) = Trim(Brr(i, 2))
Crr(R, 4) = Trim(Split(Brr(i, 3) & vbLf, vbLf)(0))
Crr(R, 5) = Val(Brr(i, 4))
Crr(R, 6) = Mid(Trim(Brr(i, 3)), InStr(Trim(Brr(i, 3)), vbLf) + 1)
'¡ô±NBrr°}¦Cȼg¤JCrr°}¦C¤¤
i01: Next
If R = 0 Then MsgBox "¨S¦³¸ê®Æ": Exit Sub
With [¾ã²z!A2].Resize(R, 6)
.Value = Crr
'¡ô±NCrr°}¦Cȼg¤JÀx¦s®æ¤¤
.Borders.LineStyle = xlContinuous
'¡ô³]©w®æ½u
End With
End Sub |
|
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y
|
|
|
|
|
- ©«¤l
- 1387
- ¥DÃD
- 4
- ºëµØ
- 0
- ¿n¤À
- 1397
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN
- ³nÅ骩¥»
- 2007
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-9-11
- ³Ì«áµn¿ý
- 2024-11-22
|
|
google"EXCEL°g" blog ©Îgoogleºô§}:https://hcm19522.blogspot.com/
|
|
|
|
|
- ©«¤l
- 70
- ¥DÃD
- 9
- ºëµØ
- 0
- ¿n¤À
- 83
- ÂI¦W
- 27
- §@·~¨t²Î
- win
- ³nÅ骩¥»
- 7
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2024-2-3
- ³Ì«áµn¿ý
- 2024-11-16
|
¦^´_ 6# hcm19522
¤j¯«¨D§U
§Ú¸ÕµÛק靈¥H¤U¨âÓ°ÝÃD
[
test2.rar (36.36 KB)
]37516[/attachimg]
1."°O¿ýªí"§Ú³o¼Ë±a¦ü¥G¶]¤ÓºC,¸ò¤£¤W ¦C¦L³t«×
2.¶À¦â¿Ã¥úµ§³¡¤À¦³·Q§ó²¼ä¤è¦¡¶Ü? |
-
-
Â^¨ú.JPG
(31.92 KB)
|
|
|
|
|
|