- ©«¤l
- 47
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 74
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows XP
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- Macau
- µù¥U®É¶¡
- 2011-6-15
- ³Ì«áµn¿ý
- 2016-7-4
|
¥»©«³Ì«á¥Ñ StanleyVic ©ó 2011-7-19 12:30 ½s¿è
¦^´_ 3# oobird
¦^¤èªk¥| : "oobird" ±z¦n! §Aªº¤èªk¬O¥ý¥þ³£©w¸q¦n.¯à§Ö³t¶]§¹¥N½X.ÁÂÁ§Aªº«Øij.
¦ý¥»¤H¯uªº«Ü·s¤â..¤]¦³«Ü¦h¥N½Xªº¦a¤è,ÁÙ¥¼¤F¸Ñ³z.¦]·Q¦h¾Ç²ß....§Æ±æ§A¤£¤¶·N..¯à¬°§Ú¸ÑÄÀ¤@¤U.¸U¤À·PÁÂ.
¤@. ¥N½X¤¤ Dim j&, n&, d, t, ai, arr ªº & ¬O¤°»ò®É·N«ä..?
n = .Range("d65536").End(xlUp).Row
d = .Range("d6:d" & n)
t = .Range("t6:t" & n)
ai = .Range("ai6:ai" & n)
¤G. ¥H¤W§Ú¤F¸Ñ¨ì¬O§A·Q¹w¥ý©w¸q¦n, ¤è«K¹B¦ævba ¤½¦¡ AN6 =IF(D6<>"",T6-AI6,"") ¦Ó«Ø¥ßªº
¥i¯à§Ú¹ï ReDim arr ¤£¤Ó¼ô©M¤£¤F¸Ñ,Åý§Ú¤U±¤£¯à¸ÑŪ¤F.. (¥H¤Uºñ¦â¬O§Ú¤F¸Ñªº¦a¤è,¦p¦³¿ù½Ð§ó¥¿§Úªº«ä¦Ò)
ReDim arr(1 To UBound(d), 0) ' ¼Æ²Õ ¥Ñ¡@[D6:DN]
For j = 1 To n - 6 ' °O¿ýªº¦æ¼Æ (¥u¦³¤º®eªº¦æ¼Æ 6~n)
If d(j, 1) <> "" Then ' ¤½¦¡ùتº§PÂ_»y¥y.if(d6<>""
arr(j, 0) = Application.WorksheetFunction.Round(t(j, 1) - ai(j, 1), 2) ' ³o¥y arr(j,0) ¤¤ªº 0 ¬O¤°»ò ?
End If
Next j
.Cells(6, "AN").Resize(UBound(d), 1) = arr ' ¤£©ú¥Õ³o¥y¥N½X
End With
¦A¦¸Á¹L"oobird" ¨¯W¤F.. !! :loveliness: :handshake |
|