A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

find text string to use in a sumproduct



 
 
Thread Tools Display Modes
  #1  
Old June 3rd, 2010, 05:30 AM posted to microsoft.public.excel.worksheet.functions
MarkN
external usenet poster
 
Posts: 124
Default find text string to use in a sumproduct

Hello,

I would like to create a sumproduct function that checks whether column a
contains the letter "M" and then if column f contains the text string "test"
to return the sum. The problem is column f contains such things as "TEST",
"test(A)", "test-20/1/10" and "testing". I want to count all of these.
--
Thanks in advance for any suggestions,
MarkN
  #2  
Old June 3rd, 2010, 05:30 AM posted to microsoft.public.excel.worksheet.functions
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default find text string to use in a sumproduct

Try
=SUMPRODUCT((A1:A20="m")*(ISNUMBER(SEARCH("test",F 1:F20))))

--
Jacob (MVP - Excel)


"MarkN" wrote:

Hello,

I would like to create a sumproduct function that checks whether column a
contains the letter "M" and then if column f contains the text string "test"
to return the sum. The problem is column f contains such things as "TEST",
"test(A)", "test-20/1/10" and "testing". I want to count all of these.
--
Thanks in advance for any suggestions,
MarkN

  #3  
Old June 3rd, 2010, 06:54 AM posted to microsoft.public.excel.worksheet.functions
David Billigmeier
external usenet poster
 
Posts: 182
Default find text string to use in a sumproduct

The following formula will perform a count of all occurences you mention...
however you didn't mention the column you want to subsequently sum if these 2
conditions return true, so add this column as the 3rd argument in the
sumproduct function:

=SUMPRODUCT(--(ISNUMBER(SEARCH("m",A1:A20))),--(ISNUMBER(SEARCH("test",F1:F20))))


--
Regards,
Dave


"MarkN" wrote:

Hello,

I would like to create a sumproduct function that checks whether column a
contains the letter "M" and then if column f contains the text string "test"
to return the sum. The problem is column f contains such things as "TEST",
"test(A)", "test-20/1/10" and "testing". I want to count all of these.
--
Thanks in advance for any suggestions,
MarkN

  #4  
Old June 3rd, 2010, 07:26 AM posted to microsoft.public.excel.worksheet.functions
MarkN
external usenet poster
 
Posts: 124
Default find text string to use in a sumproduct

Thanks to you both for your prompt replies, works like a charm.
--
Cheers,
MarkN


"David Billigmeier" wrote:

The following formula will perform a count of all occurences you mention...
however you didn't mention the column you want to subsequently sum if these 2
conditions return true, so add this column as the 3rd argument in the
sumproduct function:

=SUMPRODUCT(--(ISNUMBER(SEARCH("m",A1:A20))),--(ISNUMBER(SEARCH("test",F1:F20))))


--
Regards,
Dave


"MarkN" wrote:

Hello,

I would like to create a sumproduct function that checks whether column a
contains the letter "M" and then if column f contains the text string "test"
to return the sum. The problem is column f contains such things as "TEST",
"test(A)", "test-20/1/10" and "testing". I want to count all of these.
--
Thanks in advance for any suggestions,
MarkN

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:36 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.