Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Charles
 
Posts: n/a
Default Using Wildcard characters in sumproduct

=SUMPRODUCT(('Jan 05'!$B$2:$B$4963="20 ")*('Jan
05'!$C$2:$C$4963="H*")*'Jan 05'!$D$2:$D$4963)
In above example I would like to sum certain celss if c2 through c4963 has a
string that starts with an H and I dont care what follows. I used the * as
wildcard but I don't think it is right as it does not work. How do you do
this?
  #2   Report Post  
Biff
 
Posts: n/a
Default

Hi!

Sumproduct itself won't accept wildcards. Try this:

=SUMPRODUCT(('Jan 05'!$B$2:$B$4963="20 ")*(LEFT('Jan
05'!$C$2:$C$4963)="H")*'Jan 05'!$D$2:$D$4963)

Biff

"Charles" wrote in message
...
=SUMPRODUCT(('Jan 05'!$B$2:$B$4963="20 ")*('Jan
05'!$C$2:$C$4963="H*")*'Jan 05'!$D$2:$D$4963)
In above example I would like to sum certain celss if c2 through c4963 has
a
string that starts with an H and I dont care what follows. I used the * as
wildcard but I don't think it is right as it does not work. How do you do
this?



  #3   Report Post  
ellmcg
 
Posts: n/a
Default

It may not be the neatest but...
Make another column, and use an IF statement to make one of the columns your
using in the SUMPRODUCT = 0 unless the first character = H. I think you'd
use the LEFT function to obtain the H or whatever else it is, to use in the
IF function.

Eg. =IF(LEFT(C1,1)="h",A1,0)

Then you can use this new column instead of one of the older ones in your
SUMPRODUCT function.

"Charles" wrote:

=SUMPRODUCT(('Jan 05'!$B$2:$B$4963="20 ")*('Jan
05'!$C$2:$C$4963="H*")*'Jan 05'!$D$2:$D$4963)
In above example I would like to sum certain celss if c2 through c4963 has a
string that starts with an H and I dont care what follows. I used the * as
wildcard but I don't think it is right as it does not work. How do you do
this?

  #4   Report Post  
R.VENKATARAMAN
 
Posts: n/a
Default

I saw a message in daily dose of excel(Rob ven Gelder)

click this url
http://www.dicks-blog.com/archives/c...s/counting-and
-summing-functions/

among the recent posts on the left side of the page
choose
Multicolumn Sum with Wildcard

I am sure this will solve your problem


Charles wrote in message
...
=SUMPRODUCT(('Jan 05'!$B$2:$B$4963="20 ")*('Jan
05'!$C$2:$C$4963="H*")*'Jan 05'!$D$2:$D$4963)
In above example I would like to sum certain celss if c2 through c4963 has

a
string that starts with an H and I dont care what follows. I used the * as
wildcard but I don't think it is right as it does not work. How do you do
this?



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
SUMPRODUCT with Wildcard JerryS Excel Worksheet Functions 7 June 18th 05 01:45 PM
Sumproduct Wildcard RB Excel Discussion (Misc queries) 6 May 17th 05 04:27 AM
Sumproduct with Wildcard * Jim Excel Worksheet Functions 5 April 5th 05 05:56 PM
Sumproduct function not working Scott Summerlin Excel Worksheet Functions 12 December 4th 04 05:15 AM
adding two sumproduct formulas together ski2004_2005 Excel Worksheet Functions 1 November 12th 04 09:08 PM


All times are GMT +1. The time now is 07:55 AM.

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"