Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 158
Default Wildcard character inside sumproduct

I need this component of my sumproduct function, "--(A1:A100=*Cindy Lou*)",
to return 1 when the string "Cindy Lou" is part of the cell in the range, and
0 when it is not. What I mean by "part of" is that the target cells in A1
thru A100 have multiple names separated by Alt-Enter. So if cell A1 has
three names separated by Alt-Enter and "Cindy Lou" is one of the three, I get
a 1 (True). I also need it to work if "Cindy Lou" is the only name in the
cell. I don't think it's as easy as using wildcard characters; can I do
something with the search or find functions?

Oh, and in the component I won't be quoting "Cindy Lou" specifically; it'll
be a variable (cell reference like D4).

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 158
Default Wildcard character inside sumproduct

The first one works great, thanks. The second one, I believe, is the
standard form for an exact match situation, not my "contains" case.

"Ron Coderre" wrote:

Try something like this:

For "contains"
=SUMPRODUCT(--ISNUMBER(SEARCH("cindy lou",A1:A100)))

or

For a NON-case sensitive match
=SUMPRODUCT(--(A1:A100="cindy lou"))

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"andy62" wrote:

I need this component of my sumproduct function, "--(A1:A100=*Cindy Lou*)",
to return 1 when the string "Cindy Lou" is part of the cell in the range, and
0 when it is not. What I mean by "part of" is that the target cells in A1
thru A100 have multiple names separated by Alt-Enter. So if cell A1 has
three names separated by Alt-Enter and "Cindy Lou" is one of the three, I get
a 1 (True). I also need it to work if "Cindy Lou" is the only name in the
cell. I don't think it's as easy as using wildcard characters; can I do
something with the search or find functions?

Oh, and in the component I won't be quoting "Cindy Lou" specifically; it'll
be a variable (cell reference like D4).

Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 510
Default Wildcard character inside sumproduct

Hi,

Wildcard character won't work inside sumproduct ...
My recommendation would be to use Left() Mid() Right() functions
which do work inside sumproduct() functions ...

HTH
Carim

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 634
Default Wildcard character inside sumproduct

Or just:-

=COUNTIF(A1:A100,"*cindy-lou*")

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------
It's easier to beg forgiveness than ask permission :-)



"andy62" wrote:

The first one works great, thanks. The second one, I believe, is the
standard form for an exact match situation, not my "contains" case.

"Ron Coderre" wrote:

Try something like this:

For "contains"
=SUMPRODUCT(--ISNUMBER(SEARCH("cindy lou",A1:A100)))

or

For a NON-case sensitive match
=SUMPRODUCT(--(A1:A100="cindy lou"))

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"andy62" wrote:

I need this component of my sumproduct function, "--(A1:A100=*Cindy Lou*)",
to return 1 when the string "Cindy Lou" is part of the cell in the range, and
0 when it is not. What I mean by "part of" is that the target cells in A1
thru A100 have multiple names separated by Alt-Enter. So if cell A1 has
three names separated by Alt-Enter and "Cindy Lou" is one of the three, I get
a 1 (True). I also need it to work if "Cindy Lou" is the only name in the
cell. I don't think it's as easy as using wildcard characters; can I do
something with the search or find functions?

Oh, and in the component I won't be quoting "Cindy Lou" specifically; it'll
be a variable (cell reference like D4).

Thanks!

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 340
Default Wildcard character inside sumproduct

Try in the sumproduct formula: --ISNUMBER(SEARCH("Cindy Lou",A1:A100))

andy62 wrote:

I need this component of my sumproduct function, "--(A1:A100=*Cindy Lou*)",
to return 1 when the string "Cindy Lou" is part of the cell in the range, and
0 when it is not. What I mean by "part of" is that the target cells in A1
thru A100 have multiple names separated by Alt-Enter. So if cell A1 has
three names separated by Alt-Enter and "Cindy Lou" is one of the three, I get
a 1 (True). I also need it to work if "Cindy Lou" is the only name in the
cell. I don't think it's as easy as using wildcard characters; can I do
something with the search or find functions?

Oh, and in the component I won't be quoting "Cindy Lou" specifically; it'll
be a variable (cell reference like D4).

Thanks!


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, COUNTIF and wildcard Epinn Excel Worksheet Functions 3 November 2nd 06 03:16 AM
Wildcard Character in an Array Formula Scorpvin Excel Discussion (Misc queries) 2 September 30th 05 06:44 PM
How do you find and replace a Wildcard character in Excel? Wildcard Excel Discussion (Misc queries) 8 August 18th 05 01:18 AM
How do I use the wildcard character and the NOT function? KDA Excel Worksheet Functions 1 June 24th 05 04:36 PM
Sumproduct with Wildcard * Jim Excel Worksheet Functions 5 April 5th 05 05:56 PM


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