- ©«¤l
- 233
- ¥DÃD
- 53
- ºëµØ
- 0
- ¿n¤À
- 292
- ÂI¦W
- 0
- §@·~¨t²Î
- WinXp
- ³nÅ骩¥»
- 2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-1-6
- ³Ì«áµn¿ý
- 2024-3-8
|
¥»©«³Ì«á¥Ñ jackson7015 ©ó 2012-2-20 13:50 ½s¿è
¦^´_ 16# GBKEE
¤µ¤Ñ´ú¸Õ¤Fקï«áªº¥¨¶°
¦pªG¦A¤é³øªí¤º¥u¦³1Äæ(¦pÀÉ)¸ê®Æ,«h¨Ï¥Î¥¨¶°«á·|¥X²{¤F¿ù»~°T®§"°õ¦æ¶¥¬q¿ù»~1004"
³oÓ¿ù»~¥u¦³¦b¤é³øªí¥u¦³¤@«h¸ê®Æ¤~·|µo¥Í,¦h©ó1«h¤£·|
ªþ¤WÀɮשM¥N½X
¤u§@¤é³øªí.rar (155.08 KB)
- Sub ²Öp¤é³øªí¸ê®Æ()
- Dim Ar(), Rng As Range, Xi As Long
- With Sheets("¤é³øªí")
- Set Rng = .Range("d7", .[d7].End(xlDown)) '¸ê®Æ½d³ò: BÄ榳¸ê®Æªº¦C
- If Application.CountA(Rng) = 0 Then MsgBox "¤é³øªí ¨S¦³¸ê®Æ !!!": Exit Sub '§PÂ_¤é³øªí¦³¨S¦³¸ê®Æ
- If MsgBox("¬O§_°õ¦æ½Æ»s¡H", vbYesNo) = vbNo Then Exit Sub
- ReDim Ar(1 To Rng.Count, 1 To 20) '°}¦Cªº¤j¤p 1 To 20 => ¸ê®Æ½d³ò BÄæ:VÄæ
- For Xi = 1 To Rng.Count
- Ar(Xi, 1) = .[B3] '¤é´Á
- Ar(Xi, 2) = .Cells(Rng(Xi).Row, "B") '¹ê½Õ®Ñ½s¸¹
- Ar(Xi, 3) = .Cells(Rng(Xi).Row, "N") '¹q¸¹
- Ar(Xi, 4) = .Cells(Rng(Xi).Row, "D") '¦aÂI
- SS = "=IF(RC[4]=1,""¬dµLÅѹq"",IF(RC[3]=1,""½]¬d¦¨®×"" & SUM(RC[6]:RC[9])&""KW"",""""))"
- Ar(Xi, 5) = SS '¬O§_¦¨®×
- Ar(Xi, 6) = .Cells(Rng(Xi).Row, "E") '±K§i
- Ar(Xi, 7) = .Cells(Rng(Xi).Row, "F") '«D±K§i
- KK = "=IF(COUNTA(RC[+1]),""¬O"",IF(COUNTA(RC[+2]),""§_"",""""))"
- Ar(Xi, 8) = KK '²{³õÀËÅçµ²ªG
- Ar(Xi, 9) = .Cells(Rng(Xi).Row, "G") '¬O
- Ar(Xi, 10) = .Cells(Rng(Xi).Row, "H") '§_
- Ar(Xi, 11) = .Cells(Rng(Xi).Row, "I") '¿O(´c©Ê
- Ar(Xi, 12) = .Cells(Rng(Xi).Row, "J") '¤O(´c©Ê
- Ar(Xi, 13) = .Cells(Rng(Xi).Row, "K") '¿O(«D´c©Ê
- Ar(Xi, 14) = .Cells(Rng(Xi).Row, "L") '¤O(«D´c©Ê
- Ar(Xi, 15) = .Cells(Rng(Xi).Row, "A") '¶µ¥Ø
- Ar(Xi, 16) = .Cells(Rng(Xi).Row, "O") 'Àç·~
- Ar(Xi, 17) = .Cells(Rng(Xi).Row, "R") '¦æ·~§O
- Ar(Xi, 18) = .Cells(Rng(Xi).Row, "Q") 'Åѹq¤è¦¡
- Ar(Xi, 19) = .Cells(Rng(Xi).Row, "S") '²¾°e±¡§Î
- Ar(Xi, 20) = .Cells(Rng(Xi).Row, "P") '´£³ø³¡ªù
- Next
- End With
- With Sheets("ºî¦X¸ê®Æ®w").Cells(Rows.Count, "B").End(xlUp).Offset(1)
- .Resize(Rng.Count, UBound(Ar, 2)) = Application.Transpose(Application.Transpose(Ar))
- End With
- End Sub
½Æ»s¥N½X .Resize(Rng.Count, UBound(Ar, 2)) = Application.Transpose(Application.Transpose(Ar))
²Ä34¦æ¥X²{¿ù»~
½Ð°Ýnק擄»ò©O?
¦Ó쥻ªºInteger ÅܼÆ,¬°¤°»ò¤£ª½±µ¨Ï¥ÎLongÅܼƴN¦n,°õ¦æ¦ì¤¸²Õ¸û¦h
¬O§_¦³ª©¥»ªº°ÝÃD¦Ó¤£¯àª½±µ¨Ï¥ÎLongÅܼÆ? |
|