Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to count the occurance of a specified first three letters
in a list of values in a column. On the spreadsheet level, I can use: = SUMPRODUCT(--(LEFT(TRIM(UPPER(C3:C1000)),3)="RED")) When I try this in VBA, I get an syntax error. Application.SUMPRODUCT(--(LEFT(TRIM(UPPER(C3:C1000)),3)="RED")) OR Worksheetfunction.SUMPRODUCT(--(LEFT(TRIM(UPPER(C3:C1000)), 3)="RED")) Can someone explain what I'm doing wrong? I don't need to use SUMPRODUCT, if something else like COUNTIF will work with the LEFT, TRIM, and UPPER. Thanks. John |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sumproduct with Condition OR Sumproduct with ADDRESS function - HE | Excel Discussion (Misc queries) | |||
sumproduct - < | Excel Discussion (Misc queries) | |||
Conditional SUMPRODUCT or SUMPRODUCT with Filters | Excel Worksheet Functions | |||
sumproduct? sumif(sumproduct)? | Excel Worksheet Functions | |||
sumproduct? | Excel Worksheet Functions |