6,216
社区成员




Function SumByCurrency(goal As Range, curtype As String)
Dim i As Long
Dim totalamount As Double
totalamount = 0
For i = 1 To goal.Rows.Count
If InStr(goal.Cells(i, 1).NumberFormat, curtype) > 0 Then
totalamount = totalamount + goal.Cells(i, 1)
End If
Next i
SumByCurrency = totalamount
End Function