Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 67
Default Wildcards in SUMPRODUCT

Can anyone help with this please?

I have 3 columns of data and wish to analyse the number of occasions on
which criteria in Columns B and C are met. For example:

- Column B lists types of vehicle
- Column C lists whether or not the vehicle is roadworthy

The complicating issue (from my point of view) is that I need to include
specific words within cells in Column B within the count, ie; types of
vehicles in B will be, for example, "Leyland Olympians", "Volvo Olympians",
etc. In the calculation I need the SUMPRODUCT result to show not only the
number of cases where Leyland Olympians and Volvo Olympians are roadworthy
(that's easy enough) but when all Olympians are rodaworthy. I have
simplified the example - I don't want to merely add the 2 figures together
as there are many different variables beyond the 2 I have listed.

I have tried:

=SUMPRODUCT(($B$2:$B$14="*Olympian*")*($C$2:$C$14= "R"))

but this doesn't return the correct result. It seems that COUNTIF can
handle wildcards but SUMPRODUCT can't?

Any suggestions would be welcomed!

Many thanks.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Wildcards in SUMPRODUCT

=SUMPRODUCT(--isnumber(search("Olympian",$B$2:$B$14)),--($C$2:$C$14="R"))

=find() is case sensitive.
=search() is not case sensitive.

Terry Bennett wrote:

Can anyone help with this please?

I have 3 columns of data and wish to analyse the number of occasions on
which criteria in Columns B and C are met. For example:

- Column B lists types of vehicle
- Column C lists whether or not the vehicle is roadworthy

The complicating issue (from my point of view) is that I need to include
specific words within cells in Column B within the count, ie; types of
vehicles in B will be, for example, "Leyland Olympians", "Volvo Olympians",
etc. In the calculation I need the SUMPRODUCT result to show not only the
number of cases where Leyland Olympians and Volvo Olympians are roadworthy
(that's easy enough) but when all Olympians are rodaworthy. I have
simplified the example - I don't want to merely add the 2 figures together
as there are many different variables beyond the 2 I have listed.

I have tried:

=SUMPRODUCT(($B$2:$B$14="*Olympian*")*($C$2:$C$14= "R"))

but this doesn't return the correct result. It seems that COUNTIF can
handle wildcards but SUMPRODUCT can't?

Any suggestions would be welcomed!

Many thanks.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Wildcards in SUMPRODUCT

Hi,

A small variant of the SUMPRODUCT() function suggested by Dave

SUMPRODUCT(ISNUMBER(SEARCH("Olympian",A2:A6,1))*(B 2:B6="Y"))

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Dave Peterson" wrote in message
...
=SUMPRODUCT(--isnumber(search("Olympian",$B$2:$B$14)),--($C$2:$C$14="R"))

=find() is case sensitive.
=search() is not case sensitive.

Terry Bennett wrote:

Can anyone help with this please?

I have 3 columns of data and wish to analyse the number of occasions on
which criteria in Columns B and C are met. For example:

- Column B lists types of vehicle
- Column C lists whether or not the vehicle is roadworthy

The complicating issue (from my point of view) is that I need to include
specific words within cells in Column B within the count, ie; types of
vehicles in B will be, for example, "Leyland Olympians", "Volvo
Olympians",
etc. In the calculation I need the SUMPRODUCT result to show not only
the
number of cases where Leyland Olympians and Volvo Olympians are
roadworthy
(that's easy enough) but when all Olympians are rodaworthy. I have
simplified the example - I don't want to merely add the 2 figures
together
as there are many different variables beyond the 2 I have listed.

I have tried:

=SUMPRODUCT(($B$2:$B$14="*Olympian*")*($C$2:$C$14= "R"))

but this doesn't return the correct result. It seems that COUNTIF can
handle wildcards but SUMPRODUCT can't?

Any suggestions would be welcomed!

Many thanks.


--

Dave Peterson


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 67
Default Wildcards in SUMPRODUCT

Many thanks guys


"Dave Peterson" wrote in message
...
=SUMPRODUCT(--isnumber(search("Olympian",$B$2:$B$14)),--($C$2:$C$14="R"))

=find() is case sensitive.
=search() is not case sensitive.

Terry Bennett wrote:

Can anyone help with this please?

I have 3 columns of data and wish to analyse the number of occasions on
which criteria in Columns B and C are met. For example:

- Column B lists types of vehicle
- Column C lists whether or not the vehicle is roadworthy

The complicating issue (from my point of view) is that I need to include
specific words within cells in Column B within the count, ie; types of
vehicles in B will be, for example, "Leyland Olympians", "Volvo
Olympians",
etc. In the calculation I need the SUMPRODUCT result to show not only
the
number of cases where Leyland Olympians and Volvo Olympians are
roadworthy
(that's easy enough) but when all Olympians are rodaworthy. I have
simplified the example - I don't want to merely add the 2 figures
together
as there are many different variables beyond the 2 I have listed.

I have tried:

=SUMPRODUCT(($B$2:$B$14="*Olympian*")*($C$2:$C$14= "R"))

but this doesn't return the correct result. It seems that COUNTIF can
handle wildcards but SUMPRODUCT can't?

Any suggestions would be welcomed!

Many thanks.


--

Dave Peterson



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
Wildcards with Sumproduct? Hilton Excel Discussion (Misc queries) 5 August 29th 08 04:02 PM
Sumproduct with wildcards Saintsman Excel Worksheet Functions 3 January 18th 07 02:51 PM
sumproduct won't accept wildcards dcd123 Excel Worksheet Functions 1 September 20th 05 02:40 PM
Sumproduct and wildcards vipa2000 Excel Worksheet Functions 18 July 31st 05 09:24 PM
Wildcards with SumProduct pomalley Excel Worksheet Functions 7 March 24th 05 03:01 PM


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