ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ½Ð°Ý¦p¦ó§PÂ_COLUMN A ¬O§_ªÅ¥Õ, ¤§«á¦Û°Ê±NCOLUMN B ¤ÎCOLUMN C ­¼¦b¤@°_?

[µo°Ý] ½Ð°Ý¦p¦ó§PÂ_COLUMN A ¬O§_ªÅ¥Õ, ¤§«á¦Û°Ê±NCOLUMN B ¤ÎCOLUMN C ­¼¦b¤@°_?

¥»©«³Ì«á¥Ñ cdcc ©ó 2011-4-22 23:25 ½s¿è

USD        20        1        =+B3*C3
HKD        60        7.8       
USD        2        1       
USD        1        1       
HKD        99        7.8       

¥u¯à§Q¥ÎApplication.Sum »yªk, ±Ncolumn b & column c ¥[¦b¤@°_. ¦ý¤£ª¾¦p¦ó­×§ï¤~¯à¹F¨ì­¼¦b¤@°_?
ÁÂÁÂÀ°¦£

Sub a()
   
    Dim ae As Integer, ce As String, cf As String, he As Variant
   
   
   
    For ae = 2 To [A999].End(xlUp).Row
    ce = Sheets("sheet1").Cells(ae, 2)
    cf = Sheets("sheet1").Cells(ae, 3)
    he = Application.Sum(ce, cf)
    Cells(ae, 4) = he
    Next ae
   
    End Sub

For ae = 2 To [A999].End(xlUp).Row
   If Cells(ae, 1) <> "" Then Cells(ae, 4) = Cells(ae, 2) * Cells(ae, 3)
    Next

TOP

¦^´_ 1# cdcc

    ¼Ó¥Dªº·N«ä¸ÑŪ°_¨Ó¹³¬O
   1. ¥ý±N¨C¤@¦Cªºb»Pc¬Û­¼
   2. ¨Ì¹ô­È±Nb*cªº­È¥[Á`°_¨Ó
   ­Y¬O³o¼Ëªº¸Ü,¦p¤U­zµ{¦¡½X
Sub a()
   
For ae = 1 To [A999].End(xlUp).Row
   If Cells(ae, 1) <> "" Then Cells(ae, 4) = Cells(ae, 2) * Cells(ae, 3)
    Next
    Range("A1:A5").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range("E1" _
        ), Unique:=True
Do Until Range("E" & 1 + I) = ""
   Range("F" & 1 + I) = Application.SumIf(Range("A1:A5"), Range("E" & 1 + I), Range("D1:D5"))
I = I + 1
Loop
End Sub
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

ÁÂÁ¤j®aÀ°¦£.

¥i¯à§Úªí¹F¤£¦n. ©Ò¥H¥X²{­ø¸Ñ.

¨ä¹êchin15 ªºµªÂÐ, ¤w¸g¬O§Ú»Ý­nªº­n¨D.

ÁÂÁÂ

TOP

        ÀR«ä¦Û¦b : ¡i¬°µ½Ävª§¡j¤H¥Í­n¬°µ½Ävª§¡A¤À¬í¥²ª§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD