Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Ron is offline
external usenet poster
 
Posts: 250
Default Wildcard for Conditional Sum Wizard statement.

In a simple SUMIF function this
=SUMIF(A2:A5,"CAD-EC-*",B2:B5)
works fine for summing the two CAD-EC entries below ($9,000).

A B
CAD-EC-001 $4,000
CAD-GC-001 $1,000
CAD-PC-001 $1,000
CAD-EC-002 $5,000

But when I use the Conditional Sum Wizard,
=SUM(IF(A2:A5="CAD-EC-*",B2:B5,0))
This €œCAD-EC-*€ doesnt work. Or does it, and I dont know how to use
it. The reason I need to use the conditional sum wizard is that I actually
have other conditions, I'm just trying to keep it simple to find the correct
wildcard usage.



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 751
Default Wildcard for Conditional Sum Wizard statement.

No, you are right, it does not work this way, because you are
attempting equality. Try this:

=SUM(IF(ISNUMBER(SEARCH("CAD-EC-",A2:A5)),B2:B5,0))

This is an *array* formula, thus you need to commit it with Ctrl+Shift
+Enter. A non-array version is with SUMPRODUCT:

=SUMPRODUCT(B2:B5*ISNUMBER(SEARCH("CAD-EC-",A2:A5)))

HTH
Kostis Vezerides

On Feb 13, 5:07 pm, ron wrote:
In a simple SUMIF function this
=SUMIF(A2:A5,"CAD-EC-*",B2:B5)
works fine for summing the two CAD-EC entries below ($9,000).

A B
CAD-EC-001 $4,000
CAD-GC-001 $1,000
CAD-PC-001 $1,000
CAD-EC-002 $5,000

But when I use the Conditional Sum Wizard,
=SUM(IF(A2:A5="CAD-EC-*",B2:B5,0))
This "CAD-EC-*" doesn't work. Or does it, and I don't know how to use
it. The reason I need to use the conditional sum wizard is that I actually
have other conditions, I'm just trying to keep it simple to find the correct
wildcard usage.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default Wildcard for Conditional Sum Wizard statement.

Wildcards only work with SUMIF and COUNTIF, not IF().

You can use other techniques, for instance:

=SUMPRODUCT(--(LEFT(A2:A5,7)="CAD-EC-"))

which you can generalize to add conditions.

In article ,
ron wrote:

In a simple SUMIF function this
=SUMIF(A2:A5,"CAD-EC-*",B2:B5)
works fine for summing the two CAD-EC entries below ($9,000).

A B
CAD-EC-001 $4,000
CAD-GC-001 $1,000
CAD-PC-001 $1,000
CAD-EC-002 $5,000

But when I use the Conditional Sum Wizard,
=SUM(IF(A2:A5="CAD-EC-*",B2:B5,0))
This €œCAD-EC-*€ doesnt work. Or does it, and I dont know how to use
it. The reason I need to use the conditional sum wizard is that I actually
have other conditions, I'm just trying to keep it simple to find the correct
wildcard usage.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Ron is offline
external usenet poster
 
Posts: 250
Default Wildcard for Conditional Sum Wizard statement.

That's what I needed. Thanks.

"ron" wrote:

In a simple SUMIF function this
=SUMIF(A2:A5,"CAD-EC-*",B2:B5)
works fine for summing the two CAD-EC entries below ($9,000).

A B
CAD-EC-001 $4,000
CAD-GC-001 $1,000
CAD-PC-001 $1,000
CAD-EC-002 $5,000

But when I use the Conditional Sum Wizard,
=SUM(IF(A2:A5="CAD-EC-*",B2:B5,0))
This €œCAD-EC-*€ doesnt work. Or does it, and I dont know how to use
it. The reason I need to use the conditional sum wizard is that I actually
have other conditions, I'm just trying to keep it simple to find the correct
wildcard usage.



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
Conditional Sum w/o using the Wizard. Ron Excel Worksheet Functions 3 February 10th 07 07:33 PM
Excel Conditional Formating using 'like' or wildcard logicals LDUNN1 Excel Worksheet Functions 0 October 23rd 06 11:30 AM
If statement to compare for wildcard value in another cell. Karen53 Excel Worksheet Functions 3 July 12th 06 05:28 AM
How do I use a wildcard in an if statement? Lenny Excel Discussion (Misc queries) 3 January 26th 05 11:49 PM
Wildcard Not Working in IF statement [email protected] Excel Worksheet Functions 6 January 9th 05 07:49 AM


All times are GMT +1. The time now is 01:44 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"