Hi,
i was trying to write a code that would sum if the cost of data consumption of non blackberry smartphone in national.
so i have a table where i get if the phone is a blackberry or not (column K) and if it is national or international (column N). Here is what i wrote but i get a compile error
i was trying to write a code that would sum if the cost of data consumption of non blackberry smartphone in national.
so i have a table where i get if the phone is a blackberry or not (column K) and if it is national or international (column N). Here is what i wrote but i get a compile error
Code:
'copy COST OF NON BLACKBERRY DATA NATIONAL
TotalIN = 0
ActiveWorkbook.Sheets("Section_14").Activate
Dim sumnbbItem As Variant
Tete = Array("Mobile Internet", _
"Internet On GSM")
For Each cstnbbItem In Tete
costnbbmn = costnbbmn + WorksheetFunction.SumIf(Range("K$3:K$1048576"), sumnbbItem , _
(If Range("N$3:N$1048576") = "GPRS national" Then), Range("J$3:J$1048576"))
Next
ActiveWorkbook.Sheets("SynthesisVSD").Activate
Range("A29").Value = "Cost of Non BlackBerry handset National data consumption:"
Range("B29").Value = sumbbmn
End If