<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Multiple Substitute Formula</title>
	<atom:link href="http://dailydoseofexcel.com/archives/2009/12/09/multiple-substitute-formula/feed/" rel="self" type="application/rss+xml" />
	<link>http://dailydoseofexcel.com/archives/2009/12/09/multiple-substitute-formula/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Wed, 22 May 2013 07:02:37 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: Michael</title>
		<link>http://dailydoseofexcel.com/archives/2009/12/09/multiple-substitute-formula/#comment-42732</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Fri, 11 Dec 2009 00:53:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=3346#comment-42732</guid>
		<description><![CDATA[&lt;p&gt;Hmmm, I tried the internal components both as standard formulas and CSEs. If I find the time I&#039;ll check it out again. Maybe Excel was just being weird...&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Hmmm, I tried the internal components both as standard formulas and CSEs. If I find the time I&#8217;ll check it out again. Maybe Excel was just being weird&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fzz</title>
		<link>http://dailydoseofexcel.com/archives/2009/12/09/multiple-substitute-formula/#comment-42729</link>
		<dc:creator>fzz</dc:creator>
		<pubDate>Thu, 10 Dec 2009 22:23:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=3346#comment-42729</guid>
		<description><![CDATA[&lt;p&gt;Yeah, I forgot the TRIM.&lt;/p&gt;
&lt;p&gt;Another alternative, if one had generalized concatenation and regular expression substitute functions, would be to define a name (REGEX) referring to the formula =&quot;(&quot;&amp;MID(generalized_concatenation(&quot;&#124; &quot;&amp;B1:B51&amp;&quot; &quot;),2,1024)&amp;&quot;)&quot;, then use simpler formulas like =TRIM(regular_expression_substitute(A1,REGEX,&quot; &quot;)).&lt;/p&gt;
&lt;p&gt;Another wrinkle: probably only want to remove state names as words rather than as substrings, e.g., probably don&#039;t want to remove Georgia from &#039;Georgian Armoire&#039;.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Yeah, I forgot the TRIM.</p>
<p>Another alternative, if one had generalized concatenation and regular expression substitute functions, would be to define a name (REGEX) referring to the formula =&#8221;(&#8220;&amp;MID(generalized_concatenation(&#8220;| &#8220;&amp;B1:B51&amp;&#8221; &#8220;),2,1024)&amp;&#8221;)&#8221;, then use simpler formulas like =TRIM(regular_expression_substitute(A1,REGEX,&#8221; &#8220;)).</p>
<p>Another wrinkle: probably only want to remove state names as words rather than as substrings, e.g., probably don&#8217;t want to remove Georgia from &#8216;Georgian Armoire&#8217;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick Kusleika</title>
		<link>http://dailydoseofexcel.com/archives/2009/12/09/multiple-substitute-formula/#comment-42728</link>
		<dc:creator>Dick Kusleika</dc:creator>
		<pubDate>Thu, 10 Dec 2009 22:08:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=3346#comment-42728</guid>
		<description><![CDATA[&lt;p&gt;David:  It will only do the first state.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>David:  It will only do the first state.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick Kusleika</title>
		<link>http://dailydoseofexcel.com/archives/2009/12/09/multiple-substitute-formula/#comment-42727</link>
		<dc:creator>Dick Kusleika</dc:creator>
		<pubDate>Thu, 10 Dec 2009 22:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=3346#comment-42727</guid>
		<description><![CDATA[&lt;p&gt;Micheal, Jean Paul:  Mine are array formulas, entered with ctl+shift+enter.  See&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.dailydoseofexcel.com/archives/2004/04/05/anatomy-of-an-array-formula/&quot; rel=&quot;nofollow&quot;&gt;http://www.dailydoseofexcel.com/archives/2004/04/05/anatomy-of-an-array-formula/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;When I was writing this post, I was going to point to that post for anyone who doesn&#039;t know what an array formula is.  When I got there, I learned that my new CodeColerer add-in was screwing up code tags with no arguments (or so I thought) and that post was a mess.  By the time I fixed it all up (with JP&#039;s help), I&#039;d forgot about creating the link.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Micheal, Jean Paul:  Mine are array formulas, entered with ctl+shift+enter.  See</p>
<p><a href="http://www.dailydoseofexcel.com/archives/2004/04/05/anatomy-of-an-array-formula/" rel="nofollow">http://www.dailydoseofexcel.com/archives/2004/04/05/anatomy-of-an-array-formula/</a></p>
<p>When I was writing this post, I was going to point to that post for anyone who doesn&#8217;t know what an array formula is.  When I got there, I learned that my new CodeColerer add-in was screwing up code tags with no arguments (or so I thought) and that post was a mess.  By the time I fixed it all up (with JP&#8217;s help), I&#8217;d forgot about creating the link.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick Rothstein (MVP - Excel)</title>
		<link>http://dailydoseofexcel.com/archives/2009/12/09/multiple-substitute-formula/#comment-42725</link>
		<dc:creator>Rick Rothstein (MVP - Excel)</dc:creator>
		<pubDate>Thu, 10 Dec 2009 21:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=3346#comment-42725</guid>
		<description><![CDATA[&lt;p&gt;@fzz... Yes, that seems to work although you need to encase it within a TRIM function call to get rid of possible multiple internal and/or trailing spaces.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>@fzz&#8230; Yes, that seems to work although you need to encase it within a TRIM function call to get rid of possible multiple internal and/or trailing spaces.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fzz</title>
		<link>http://dailydoseofexcel.com/archives/2009/12/09/multiple-substitute-formula/#comment-42722</link>
		<dc:creator>fzz</dc:creator>
		<pubDate>Thu, 10 Dec 2009 19:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=3346#comment-42722</guid>
		<description><![CDATA[&lt;p&gt;Wasn&#039;t this covered way back in David Hager&#039;s Excel newsletter?&lt;/p&gt;
&lt;p&gt;Make the &#039;state&#039; list include D.C. as well as a blank row below Wyoming, so 52 rows in all. Then enter the following array formula in C1.&lt;/p&gt;
&lt;p&gt;=SUBSTITUTE(A1,INDEX($B$1:$B$52,MATCH(1,COUNTIF(A1,&quot;*&quot;&amp;$B$1:$B$52&amp;&quot;*&quot;),0)),&quot;&quot;)&lt;/p&gt;
&lt;p&gt;Augmenting lists usually eliminates the need for space- and recalc time-wasting redundant expressions.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Wasn&#8217;t this covered way back in David Hager&#8217;s Excel newsletter?</p>
<p>Make the &#8216;state&#8217; list include D.C. as well as a blank row below Wyoming, so 52 rows in all. Then enter the following array formula in C1.</p>
<p>=SUBSTITUTE(A1,INDEX($B$1:$B$52,MATCH(1,COUNTIF(A1,&#8221;*&#8221;&amp;$B$1:$B$52&amp;&#8221;*&#8221;),0)),&#8221;")</p>
<p>Augmenting lists usually eliminates the need for space- and recalc time-wasting redundant expressions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick Rothstein (MVP - Excel)</title>
		<link>http://dailydoseofexcel.com/archives/2009/12/09/multiple-substitute-formula/#comment-42715</link>
		<dc:creator>Rick Rothstein (MVP - Excel)</dc:creator>
		<pubDate>Thu, 10 Dec 2009 08:08:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=3346#comment-42715</guid>
		<description><![CDATA[&lt;p&gt;@Jean Paul... The formula I posted does **not** require you to commit it using Ctrl+Shift+Enter... the formula works fine just using Enter by itself to commit it.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>@Jean Paul&#8230; The formula I posted does **not** require you to commit it using Ctrl+Shift+Enter&#8230; the formula works fine just using Enter by itself to commit it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Wasserman</title>
		<link>http://dailydoseofexcel.com/archives/2009/12/09/multiple-substitute-formula/#comment-42706</link>
		<dc:creator>David Wasserman</dc:creator>
		<pubDate>Thu, 10 Dec 2009 03:35:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=3346#comment-42706</guid>
		<description><![CDATA[&lt;p&gt;Nice work, Dick! &lt;/p&gt;
&lt;p&gt;One question: What will the result be if the string contains two states like &quot;Chairs Florida New York&quot;?&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Nice work, Dick! </p>
<p>One question: What will the result be if the string contains two states like &#8220;Chairs Florida New York&#8221;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob van Gelder</title>
		<link>http://dailydoseofexcel.com/archives/2009/12/09/multiple-substitute-formula/#comment-42704</link>
		<dc:creator>Rob van Gelder</dc:creator>
		<pubDate>Thu, 10 Dec 2009 01:31:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=3346#comment-42704</guid>
		<description><![CDATA[&lt;p&gt;Michael&lt;/p&gt;
&lt;p&gt;The following User Defined Function will produce the same results&lt;/p&gt;
&lt;p&gt;(Fingers crossed this comment box presents it correctly)&lt;/p&gt;
&lt;p&gt;Function RemoveState(StatesRange As Range, TargetString As String) As String&lt;br&gt;
&#160;&#160;&#160;&#160;Dim rng As Range, str As String&lt;/p&gt;
&lt;p&gt;&#160;&#160;&#160;&#160;str = TargetString&lt;br&gt;
&#160;&#160;&#160;&#160;For Each rng In StatesRange&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;If InStr(1, str, rng.Value) &lt;&gt; 0 Then&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;str = Trim(Replace(str, rng.Value, &quot;&quot;))&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Exit For&lt;br&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;End If&lt;br&gt;
&#160;&#160;&#160;&#160;Next&lt;br&gt;
&#160;&#160;&#160;&#160;RemoveState = str&lt;br&gt;
End Function&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Michael</p>
<p>The following User Defined Function will produce the same results</p>
<p>(Fingers crossed this comment box presents it correctly)</p>
<p>Function RemoveState(StatesRange As Range, TargetString As String) As String<br />
&nbsp;&nbsp;&nbsp;&nbsp;Dim rng As Range, str As String</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;str = TargetString<br />
&nbsp;&nbsp;&nbsp;&nbsp;For Each rng In StatesRange<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If InStr(1, str, rng.Value) &lt;&gt; 0 Then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;str = Trim(Replace(str, rng.Value, &#8220;&#8221;))<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Exit For<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End If<br />
&nbsp;&nbsp;&nbsp;&nbsp;Next<br />
&nbsp;&nbsp;&nbsp;&nbsp;RemoveState = str<br />
End Function</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jean Paul</title>
		<link>http://dailydoseofexcel.com/archives/2009/12/09/multiple-substitute-formula/#comment-42702</link>
		<dc:creator>Jean Paul</dc:creator>
		<pubDate>Wed, 09 Dec 2009 23:47:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=3346#comment-42702</guid>
		<description><![CDATA[&lt;p&gt;Dick,&lt;br&gt;
Thank you for the nice post&lt;br&gt;
To work all formula must be matrix validated (CTRL+Uppercase+Enter)&lt;br&gt;
Best regards&lt;br&gt;
Jean Paul&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Dick,<br />
Thank you for the nice post<br />
To work all formula must be matrix validated (CTRL+Uppercase+Enter)<br />
Best regards<br />
Jean Paul</p>
]]></content:encoded>
	</item>
</channel>
</rss>
