Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hello
i am working on my project, that will count amount of entries from one sheet by two criterias, and will insert that amount into another sheet, and i have no idea what is wrong with this funtion that i wrote, it is giving me an error everytime ("type mismatch") here is my funtion Sub countViolations() Sheets("Summary").Select Range("A7").Select If ActiveCell = "" Then Exit Sub Else Dim nameOfOffender As String Dim VCount As Long Dim nameOfViolation As String nameOfViolation = "Offender Missed Call (STaR)" nameOfOffender = Range("A7") Sheets("Details").Activate VCount = Application.WorksheetFunction.Sum((nameOfOffender) * (nameOfViolation)) Sheets("Summary").Range("I7") = VCount End If End Sub i am very new at this, it is my second day dealing with VBA, so if something or everything is extremely wrong with this function please dont laught :) thx |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
SumProduct not Working in a Macro | Excel Worksheet Functions | |||
Sumproduct with Condition OR Sumproduct with ADDRESS function - HE | Excel Discussion (Misc queries) | |||
SUMPRODUCT macro | Excel Discussion (Misc queries) | |||
sumproduct in Excel Macro | Excel Programming | |||
How to use SUMPRODUCT in macro? | Excel Programming |