Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA and the SumProduct Function
I am trying to make this comparison work;
xlApp.Range("j15") = xlApp.WorksheetFunction.SumProduct(--(xlApp.Worksheets(ShtRef).Range(ColRng) = "89298"), --(xlApp.Worksheets(ShtRef).Range(rngref) 0)) 'xlApp.WorksheetFunction.CountIf(xlApp.Worksheets( ShtRef).Range(ColRng), "89298") + xlApp.WorksheetFunction.CountIf(xlApp.Worksheets(" Dec Contract").Range(ColRng), "89298") Variables for range and sheet names are correct and work in many other situations so I know its not them. I want to set a field equal to the number of times both criteria match. If I plug it into the cell manually with out the Worksheets. etc syntax and use the Range:Range notation it works on the range. Any Ideas on what I'm doing wrong |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sumproduct with Condition OR Sumproduct with ADDRESS function - HE | Excel Discussion (Misc queries) | |||
SumProduct function | Excel Discussion (Misc queries) | |||
sumproduct function / VB user defined function | Excel Discussion (Misc queries) | |||
sumproduct function | Excel Worksheet Functions | |||
SUMIF Function Inside SUMPRODUCT Function | Excel Worksheet Functions |