Combining Text & Mid function with Wildcard in Sumif

howard

Well-known Member
Joined
Jun 26, 2006
Messages
5,639
Office Version
  1. 2019
Platform
  1. Windows
I Have the following sample data

<b>Excel 2012</b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #BBB"><colgroup><col width="25px" style="background-color: #DAE7F5" /><col /><col /></colgroup><thead><tr style=" background-color: #DAE7F5;text-align: center;color: #161120"><th></th><th>L</th><th>M</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">56</td><td style=";">G Marley</td><td style="text-align: right;;">0</td></tr></tbody></table><p style="width:10.2em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #BBB;border-top:none;text-align: center;background-color: #DAE7F5;color: #161120">Donations General</p><br /><br />

I have created a table of names in Col L for the names that appears in Col E and a Sumif formula in Col M

=SUMIF(E:E,"*marley*",G:G)

I would like to replace the criteria with a formula containing a wildcard character as the text in Col E appears as DON: G Marley

I have many names so to have to manually type in the criteria would take a lot of time

Your assistance in this regard is most appreciated
 

Some videos you may like

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Snakehips

Well-known Member
Joined
May 17, 2009
Messages
5,059
Office Version
  1. 2013
Platform
  1. Windows
howard,

Does this help?
<b>Excel 2007</b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #A6AAB6"><colgroup><col width="25px" style="background-color: #E0E0F0" /><col /><col /><col /><col /><col /><col /><col /><col /><col /></colgroup><thead><tr style=" background-color: #E0E0F0;text-align: center;color: #161120"><th></th><th>E</th><th>F</th><th>G</th><th>H</th><th>I</th><th>J</th><th>K</th><th>L</th><th>M</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">2</td><td style=";">DON: A N Other</td><td style="text-align: right;;"></td><td style="text-align: right;;">22</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style=";">G Marley</td><td style="text-align: right;;">32</td></tr><tr ><td style="color: #161120;text-align: center;">3</td><td style=";">DON: J Smith</td><td style="text-align: right;;"></td><td style="text-align: right;;">44</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style=";">A N Other</td><td style="text-align: right;;">22</td></tr><tr ><td style="color: #161120;text-align: center;">4</td><td style=";">DON: G marley</td><td style="text-align: right;;"></td><td style="text-align: right;;">32</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style=";">J Smith</td><td style="text-align: right;;">56</td></tr><tr ><td style="color: #161120;text-align: center;">5</td><td style=";">J Smith</td><td style="text-align: right;;"></td><td style="text-align: right;;">12</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr></tbody></table><p style="width:6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #A6AAB6;border-top:none;text-align: center;background-color: #E0E0F0;color: #161120">Graph Data</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: #FFFFFF" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #A6AAB6"><thead><tr style=" background-color: #E0E0F0;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">M2</th><td style="text-align:left">=SUMIF(<font color="Blue">E:E,"*" &L2&"*",G:G</font>)</td></tr></tbody></table></td></tr></table><br />
 

howard

Well-known Member
Joined
Jun 26, 2006
Messages
5,639
Office Version
  1. 2019
Platform
  1. Windows
Thanks for the help, much appreciated
 

Watch MrExcel Video

Forum statistics

Threads
1,109,521
Messages
5,529,322
Members
409,863
Latest member
stacy09
Top