ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   I need to do a sumif on data that [contains] a specific string. (https://www.excelbanter.com/excel-worksheet-functions/30189-i-need-do-sumif-data-%5Bcontains%5D-specific-string.html)

JEH

I need to do a sumif on data that [contains] a specific string.
 
In the example below I need to write a formula that can add any cells that
contain the "&".

Column A Column B
Fred & Mary 1540.00
Fred & Mary 135.00
Fred & Mary 110.00
Bill 1170.00
Bill 110.00
Mary 1475.00
Mary 100.00

Because the names 'Fred & Mary' differ between spreadsheets, the "&" is the
only common denominator. For example I need to know what the 'contains' word
should be in the formula: =Sumif(a1:b7,contains"&",b1:b7).

Any ideas gratefully received.
Thanks




N Harkawat

=SUMIF(A1:A7,"*&*",B1:B7)

"JEH" wrote in message
...
In the example below I need to write a formula that can add any cells that
contain the "&".

Column A Column B
Fred & Mary 1540.00
Fred & Mary 135.00
Fred & Mary 110.00
Bill 1170.00
Bill 110.00
Mary 1475.00
Mary 100.00

Because the names 'Fred & Mary' differ between spreadsheets, the "&" is
the
only common denominator. For example I need to know what the 'contains'
word
should be in the formula: =Sumif(a1:b7,contains"&",b1:b7).

Any ideas gratefully received.
Thanks






JEH

So simple - I have searched high & low for 'wildcards' but couldn't find
anything. Thanks a lot.

"N Harkawat" wrote:

=SUMIF(A1:A7,"*&*",B1:B7)

"JEH" wrote in message
...
In the example below I need to write a formula that can add any cells that
contain the "&".

Column A Column B
Fred & Mary 1540.00
Fred & Mary 135.00
Fred & Mary 110.00
Bill 1170.00
Bill 110.00
Mary 1475.00
Mary 100.00

Because the names 'Fred & Mary' differ between spreadsheets, the "&" is
the
only common denominator. For example I need to know what the 'contains'
word
should be in the formula: =Sumif(a1:b7,contains"&",b1:b7).

Any ideas gratefully received.
Thanks








All times are GMT +1. The time now is 04:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com