½Ð±Ð¦U¦ì«e½úÃö©óVB ¤@¨Ç°ÝÃD
- ©«¤l
- 38
- ¥DÃD
- 12
- ºëµØ
- 0
- ¿n¤À
- 122
- ÂI¦W
- 0
- §@·~¨t²Î
- winxp
- ³nÅ骩¥»
- office2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- na
- µù¥U®É¶¡
- 2010-7-31
- ³Ì«áµn¿ý
- 2024-5-13
|
½Ð±Ð¦U¦ì«e½úÃö©óVB ¤@¨Ç°ÝÃD
§Ú·Q°ÝÃD°ÝÃD¦p¹Ï©Ò¥Ü:
§Ú©Ò¼gªºµ{¦¡¦p¤U:
' Macro11 ¥¨¶°ªí
'
Dim i As Single
Dim j As Single
Dim k As Single
Dim h As Single
Dim x As Range, Y As Range, rng As Range, r As Long '«Å§iÅܼÆ
For j = 1 To 3
For i = 1 To 300
If Cells(1 + i, 38) = Cells(1, 52 + j) Then
Cells(1 + i, 52 + j) = Cells(1 + i, 8)
End If
Next i
Next j
Call tt
End Sub
Public Sub tt()
Dim x As Range, Y As Range, rng As Range, r As Long '«Å§iÅܼÆ
Dim y1 As Range, y2 As Range
For h = 1 To 3
r = Cells(65536, 52 + h).End(xlUp).Row '¨úªºAÄæ³Ì¤j¦C¦ì
Select Case h
Case 1
Set rng = Range("ba2:ba" & r) '¨ú±o¸ê®Æ½d³ò
For Each x In rng '¸ê®Æ½d³ò¤º¨C¤@Àx¦s®æ
If x = "" Then 'YÀx¦s®æȬ°""
If Y Is Nothing Then 'YY¤£¦s¦b
Set Y = x '±NY³]©w¬°x
Else 'YY¦s¦b
Set Y = Union(Y, x) 'µ²¦XY¤Îx¦¨¬°·sªº½d³òY
End If
End If
Next
If Not Y Is Nothing Then Y.Delete (xlUp) 'YY¦s¦b±NY§R°£
Case 2
Set rng = Range("bb2:bb" & r) '¨ú±o¸ê®Æ½d³ò
For Each x In rng '¸ê®Æ½d³ò¤º¨C¤@Àx¦s®æ
If x = "" Then 'YÀx¦s®æȬ°""
If y1 Is Nothing Then 'YY¤£¦s¦b
Set y1 = x '±NY³]©w¬°x
Else 'YY¦s¦b
Set y1 = Union(y1, x) 'µ²¦XY¤Îx¦¨¬°·sªº½d³òY
End If
End If
Next
If Not y1 Is Nothing Then y1.Delete (xlUp) 'YY¦s¦b±NY§R°£
Case 3
Set rng = Range("bc2:bc" & r) '¨ú±o¸ê®Æ½d³ò
For Each x In rng '¸ê®Æ½d³ò¤º¨C¤@Àx¦s®æ
If x = "" Then 'YÀx¦s®æȬ°""
If y2 Is Nothing Then 'YY¤£¦s¦b
Set y2 = x '±NY³]©w¬°x
Else 'YY¦s¦b
Set y2 = Union(y2, x) 'µ²¦XY¤Îx¦¨¬°·sªº½d³òY
End If
End If
Next
If Not y2 Is Nothing Then y2.Delete (xlUp) 'YY¦s¦b±NY§R°£
End Select
Next h
End Sub
§Ú·Q°ÝªºÃDÃD¦p¹Ï©Ò¥Ü:
|
|
|
|
|
|
|
- ©«¤l
- 38
- ¥DÃD
- 12
- ºëµØ
- 0
- ¿n¤À
- 122
- ÂI¦W
- 0
- §@·~¨t²Î
- winxp
- ³nÅ骩¥»
- office2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- na
- µù¥U®É¶¡
- 2010-7-31
- ³Ì«áµn¿ý
- 2024-5-13
|
¦^´_ 2# GBKEE
½Ð°ÝAR=array ¬O¤£¬O¥i¥HÅܦ¨ÅܼƩO? ¸Ô²Ó¦p¹ÏÀɬõ¦â¦rÅé
°Ý²Ä¤GÓ°ÝÃD: h% ¥Nªí¤°»ò·N«ä? |
|
|
|
|
|
|
- ©«¤l
- 38
- ¥DÃD
- 12
- ºëµØ
- 0
- ¿n¤À
- 122
- ÂI¦W
- 0
- §@·~¨t²Î
- winxp
- ³nÅ骩¥»
- office2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- na
- µù¥U®É¶¡
- 2010-7-31
- ³Ì«áµn¿ý
- 2024-5-13
|
¦^´_ 4# GBKEE
AR ¬O¨ú¨M©ó§Úªþ¥ó¸ÌªºAW3~AW46(¦¹¦a¤è§Ú·|½Æ»s¨ÃÂà¸m¨ìBA1), ¦¹¦a¤è¬O·|ÀH§Úªº¸ê®ÆA¡GAQ §ïÅÜ(¦¹¦a¤èªº¸ê®Æ¬OÅܰʪº,¤]´N¬O»¡AW2 CHARTID¥Ø«e¬O44Ó,¦¹ CHARTID ¤£¬O¤@Ó©wÈ)
ÀÉ®×raw data ¦pªþ¥ó©Ò¥Ü:
Book1.rar (47.08 KB)
|
|
|
|
|
|
|
- ©«¤l
- 38
- ¥DÃD
- 12
- ºëµØ
- 0
- ¿n¤À
- 122
- ÂI¦W
- 0
- §@·~¨t²Î
- winxp
- ³nÅ骩¥»
- office2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- na
- µù¥U®É¶¡
- 2010-7-31
- ³Ì«áµn¿ý
- 2024-5-13
|
¦^´_ 2# GBKEE
°õ¦æµ{¦¡¦bY=union(Y,x) ·|¥X²{°ÝÃD,¦]¬°°õ¦æ¨ìBB column ´N¥X²{°ÝÃD,¤£ª¾¦³¨S¦³¤°»ò¤èªk¥i¥H¸Ñ©O? |
|
|
|
|
|
|
- ©«¤l
- 38
- ¥DÃD
- 12
- ºëµØ
- 0
- ¿n¤À
- 122
- ÂI¦W
- 0
- §@·~¨t²Î
- winxp
- ³nÅ骩¥»
- office2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- na
- µù¥U®É¶¡
- 2010-7-31
- ³Ì«áµn¿ý
- 2024-5-13
|
¦^´_ 8# GBKEE
§Ú¬O¨Ï¥Î§A¦^´_1ªºµ{¦¡½X°õ¦æµ{¦¡,¦b§A¼gªºµ{¦¡½X¤¤¤w¸g¦³set Y=union(Y,x) ,¶]¥X¨Óªºµ²ªG©óBA columm °õ¦æ§¹µL°ÝÃD,¦ý°õ¦æ¨ìBB column ®É´N·|¥X²{°ÝÃD |
|
|
|
|
|
|