Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
wildcards with sumif/countif in macro/vba
I know that you can use * as a wildcard with sumif and countif
functions in excel worksheets, but I was wondering if it's also possible in macros/vba. For example: Application.SumIf(Range(Cells(1, 32), Cells(433, 32)), "*.aa.1t", Range(Cells(1, 17), Cells(433, 17))) Is this possible? If not, alternatives to this would be greatly appreciated. Thanks, Stefanie |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
wildcards with sumif/countif in macro/vba
Hi
yes you can. Your statement should work. Have you tried it? -- Regards Frank Kabel Frankfurt, Germany "Stefanie K." schrieb im Newsbeitrag om... I know that you can use * as a wildcard with sumif and countif functions in excel worksheets, but I was wondering if it's also possible in macros/vba. For example: Application.SumIf(Range(Cells(1, 32), Cells(433, 32)), "*.aa.1t", Range(Cells(1, 17), Cells(433, 17))) Is this possible? If not, alternatives to this would be greatly appreciated. Thanks, Stefanie |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
wildcards with sumif/countif in macro/vba
Stefanie,
If you tried it and it didn't work, it may be that the worksheet is not active, so try fully qualifying With Worksheets("Sheet1") Application.SumIf(.Range(.Cells(1, 32), .Cells(433, 32)), "*.aa.1t",.Range(.Cells(1, 17), .Cells(433, 17))) End With -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Stefanie K." wrote in message om... I know that you can use * as a wildcard with sumif and countif functions in excel worksheets, but I was wondering if it's also possible in macros/vba. For example: Application.SumIf(Range(Cells(1, 32), Cells(433, 32)), "*.aa.1t", Range(Cells(1, 17), Cells(433, 17))) Is this possible? If not, alternatives to this would be greatly appreciated. Thanks, Stefanie |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
COUNTIF with wildcards | Excel Discussion (Misc queries) | |||
COUNTIF and wildcards | Excel Discussion (Misc queries) | |||
sumif and wildcards | Excel Worksheet Functions | |||
COUNTIF with wildcards | Excel Worksheet Functions | |||
countif wildcards? | Excel Discussion (Misc queries) |