¦³°ª¤â¥i¥HÀ°§Ú²¤Æ¤@¤U¶Ü?
- ©«¤l
- 65
- ¥DÃD
- 11
- ºëµØ
- 0
- ¿n¤À
- 83
- ÂI¦W
- 0
- §@·~¨t²Î
- Window 7
- ³nÅ骩¥»
- 2007
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2010-5-4
- ³Ì«áµn¿ý
- 2012-5-21
|
¦³°ª¤â¥i¥HÀ°§Ú²¤Æ¤@¤U¶Ü?
§Ú°µ¤F¤@Ó²³æªº²Îpµ{¦¡,¹ï¤ñ¤U"A2"ªº¤º®e¸ò"A3"ªº¤º®e¬O§_¤@P,¦pªG¬Oªº¸Ü,¨º»ò"B2"¸ò"B3"ªº¼ÆÈ´N·|¬Û¥[,¤§«á"A3"¸ò"B3"´N·|§R°£,¦pªG¬O"§_"ªº¸Ü´N¦V¤U¤@®æ,¸ê®Æ¤Öªº¸ÜÁÙ¦n,¦p§x¸ê®Æ¦h¹L500¤§«á´N·|«D±`ªººC(«Ü¦³¥i¯à§Úªº¹q¸£¤Ó¤F),¦b§Ú¦³¿ú´«·s¹q¸£¤§«e,¦³°ª¤â¥i¥HÀ°§Ú²¤Æ¤@¤U¶Ü?ÁÂÁÂ!!- Sub Test()
- Dim z As Integer
- z = 2
- Do While Range("A" & z).Value <> ""
- If Range("A" & z).Value = Range("A" & (z + 1)).Value Then
- Range("B" & z).Value = Range("B" & z).Value + Range("B" & (z + 1)).Value
- Range("A" & (z + 1), "B" & (z + 1)).Delete Shift:=xlUp
- Else
- z = z + 1
-
- End If
- Loop
- If Range("A2").Value = "-" Then Range("A2:B2").Delete Shift:=xlUp
- End Sub
½Æ»s¥N½X |
|
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X
|
|
|
|
|
- ©«¤l
- 1572
- ¥DÃD
- 16
- ºëµØ
- 2
- ¿n¤À
- 1521
- ÂI¦W
- 0
- §@·~¨t²Î
- xp
- ³nÅ骩¥»
- office 2003
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2016-1-13
|
- Sub Test()
- Dim a, d As Object, i&
- a = Range([A2], [b65536].End(3))
- Set d = CreateObject("Scripting.Dictionary")
- For i = 1 To UBound(a)
- d(a(i, 1)) = d(a(i, 1)) + a(i, 2)
- Next
- Range([A2], [b65536].End(3)) = ""
- [A2].Resize(d.Count, 1) = Application.Transpose(d.keys)
- [b2].Resize(d.Count, 1) = Application.Transpose(d.items)
- If [A2] = "-" Then [A2:B2].Delete (2)
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 65
- ¥DÃD
- 11
- ºëµØ
- 0
- ¿n¤À
- 83
- ÂI¦W
- 0
- §@·~¨t²Î
- Window 7
- ³nÅ骩¥»
- 2007
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2010-5-4
- ³Ì«áµn¿ý
- 2012-5-21
|
«z~~!!¦n¼F®`°Ú~~!!¯uªº§Ö«Ü¦h,¤£¹L¤p§Ì¤ñ¸û²Â,¦³«Ü¦h«ü¥O³£¬Ý¤£©ú¥Õ,¤j¤j¤¶·Nµ¹§Ú¤¶²Ð¤@¤U¥\¯à¸òì²z¶Ü?ÁÂÁÂ!! |
|
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X
|
|
|
|
|