Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
COUNTIF with wildcards Babymech Excel Discussion (Misc queries) 3 August 11th 08 02:18 PM
COUNTIF and wildcards mpenkala Excel Discussion (Misc queries) 3 May 29th 08 01:54 PM
sumif and wildcards oscarcounts Excel Worksheet Functions 4 March 18th 08 10:45 PM
COUNTIF with wildcards Kierano Excel Worksheet Functions 4 October 12th 06 04:08 PM
countif wildcards? Ltat42a Excel Discussion (Misc queries) 3 December 18th 05 04:59 PM


All times are GMT +1. The time now is 05:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"