Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35
Default Sumproduct if two conditions are met but using wildcards?

Hi Team,

was wondering if you could help me.... I am using the below formula


=SUMPRODUCT(--(Data!$H$1:$H$5000="||||||||MIC|||||||||||"),--(Data!$G$1:$G$5000="Ashley Tobin"))

the problem is, as you can probably see, the data is not very clean..
sometimes the data looks like this ||||||||MIC||||||||||| other times it
will be |||||||Investments & returns|MIC|||||||||||

using count if I can use wildcards and it works nicely.

=COUNTIF(Data!$H:$H,"*MIC*")

but they don't ( or I can't seem to get them to ) work when using
sumproduct... any suggestions??

thanks
Mark...

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,231
Default Sumproduct if two conditions are met but using wildcards?

"Madduck" wrote...
....
=SUMPRODUCT(--(Data!$H$1:$H$5000="||||||||MIC|||||||||||"),
--(Data!$G$1:$G$5000="Ashley Tobin"))

the problem is, as you can probably see, the data is not very clean..
sometimes the data looks like this ||||||||MIC||||||||||| other times it
will be |||||||Investments & returns|MIC|||||||||||

....

=SUMPRODUCT(--ISNUMBER(FIND("|MIC|",Data!$H$1:$H$5000)),
--(Data!$G$1:$G$5000="Ashley Tobin")))


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Sumproduct if two conditions are met but using wildcards?

"Harlan Grove" wrote in message
...
"Madduck" wrote...
...
=SUMPRODUCT(--(Data!$H$1:$H$5000="||||||||MIC|||||||||||"),
--(Data!$G$1:$G$5000="Ashley Tobin"))

the problem is, as you can probably see, the data is not very clean..
sometimes the data looks like this ||||||||MIC||||||||||| other times it
will be |||||||Investments & returns|MIC|||||||||||

...

=SUMPRODUCT(--ISNUMBER(FIND("|MIC|",Data!$H$1:$H$5000)),
--(Data!$G$1:$G$5000="Ashley Tobin")))


Geez! Here I thought those "vertical bars" were some kind of strange
formatting escape chararcter that I've never seen before but they're just
your standard pipe characters!

--
Biff
Microsoft Excel MVP


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35
Default Sumproduct if two conditions are met but using wildcards?

Thank you very much, that worked a treat... I expanded a little for the
formula to read :

=SUMPRODUCT(--ISNUMBER(FIND("MIC",Data!$H$1:$H$5000)),
--ISNUMBER(FIND("ley Tob",Data!$G$1:$G$5000)))

now it really doesn't matter how clean the data is..

Thanks again Harlan.

Mark.




"Harlan Grove" wrote:

"Madduck" wrote...
....
=SUMPRODUCT(--(Data!$H$1:$H$5000="||||||||MIC|||||||||||"),
--(Data!$G$1:$G$5000="Ashley Tobin"))

the problem is, as you can probably see, the data is not very clean..
sometimes the data looks like this ||||||||MIC||||||||||| other times it
will be |||||||Investments & returns|MIC|||||||||||

....

=SUMPRODUCT(--ISNUMBER(FIND("|MIC|",Data!$H$1:$H$5000)),
--(Data!$G$1:$G$5000="Ashley Tobin")))



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,231
Default Sumproduct if two conditions are met but using wildcards?

"Madduck" wrote...
....
=SUMPRODUCT(--ISNUMBER(FIND("MIC",Data!$H$1:$H$5000)),
--ISNUMBER(FIND("ley Tob",Data!$G$1:$G$5000)))

....

I didn't put the vertical bars in my formula by accident. If 'MIC' could
appear as a substring in some other bar-delimited field in col H, then you
could get false hits searching for "MIC" rather then searching for the
bar-delimited field "|MIC|". For example,

|||||||SYSTEMIC FAILUE||||||||

would be treated as a match in your formula.




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35
Default Sumproduct if two conditions are met but using wildcards?

Thanks Harlan,

yep I did realise that.

Thanks again.

"Harlan Grove" wrote:

"Madduck" wrote...
....
=SUMPRODUCT(--ISNUMBER(FIND("MIC",Data!$H$1:$H$5000)),
--ISNUMBER(FIND("ley Tob",Data!$G$1:$G$5000)))

....

I didn't put the vertical bars in my formula by accident. If 'MIC' could
appear as a substring in some other bar-delimited field in col H, then you
could get false hits searching for "MIC" rather then searching for the
bar-delimited field "|MIC|". For example,

|||||||SYSTEMIC FAILUE||||||||

would be treated as a match in your formula.



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 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
Can wildcards be used in SUMPRODUCT conditions Reed Excel Worksheet Functions 4 June 13th 05 10:06 PM
Wildcards with SumProduct pomalley Excel Worksheet Functions 7 March 24th 05 03:01 PM


All times are GMT +1. The time now is 10:22 PM.

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

About Us

"It's about Microsoft Excel"