<?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: Ordinal Days</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2004/07/19/ordinal-days/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2004/07/19/ordinal-days/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Wed, 08 Feb 2012 23:58:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Squiggler</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/19/ordinal-days/#comment-55663</link>
		<dc:creator>Squiggler</dc:creator>
		<pubDate>Fri, 10 Dec 2010 09:28:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=689#comment-55663</guid>
		<description>&lt;p&gt;I also adapted for dates :-&lt;/p&gt;
&lt;p&gt;=SUBSTITUTE(TEXT(DateVal,&quot;mmmm dzz, yyyy&quot;),&quot;zz&quot;,MID(REPLACE(REPT(&quot;thstndrdthththththth&quot;,4),23,6,&quot;ththth&quot;),DAY(DateVal)*2+1,2))&lt;/p&gt;
&lt;p&gt;this will convert dates into the form &quot;April 23rd, 2010&quot;&lt;br&gt;
&quot;dzz of mmmm yyyy&quot;  &quot;23rd of April 2010&quot;&lt;br&gt;
&quot;dddd the dzz of mmmm yyyy&quot; for &quot;Thursday the 1st of April 2010&quot;&lt;br&gt;
&quot;dddd mmmm dzz, yyyy&quot; for &quot;Thursday April 1st, 2010&quot;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I also adapted for dates :-</p>
<p>=SUBSTITUTE(TEXT(DateVal,&#8221;mmmm dzz, yyyy&#8221;),&#8221;zz&#8221;,MID(REPLACE(REPT(&#8220;thstndrdthththththth&#8221;,4),23,6,&#8221;ththth&#8221;),DAY(DateVal)*2+1,2))</p>
<p>this will convert dates into the form &#8220;April 23rd, 2010&#8243;<br />
&#8220;dzz of mmmm yyyy&#8221;  &#8220;23rd of April 2010&#8243;<br />
&#8220;dddd the dzz of mmmm yyyy&#8221; for &#8220;Thursday the 1st of April 2010&#8243;<br />
&#8220;dddd mmmm dzz, yyyy&#8221; for &#8220;Thursday April 1st, 2010&#8243;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick Rothstein (MVP - Excel)</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/19/ordinal-days/#comment-55576</link>
		<dc:creator>Rick Rothstein (MVP - Excel)</dc:creator>
		<pubDate>Wed, 08 Dec 2010 06:39:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=689#comment-55576</guid>
		<description>&lt;p&gt;While Greg posted his function about a year-and-a-half ago, I thought anyone into VB code might be interested in this one-liner function I&#039;ve posted several times in the past in the compiled VB newsgroups (it works for all numbers, not just date day numbers like Greg&#039;s function)...&lt;/p&gt;
&lt;div style=&quot;overflow: auto; white-space: nowrap;&quot; class=&quot;codecolorer-container vb default&quot;&gt;&lt;div style=&quot;white-space: nowrap;&quot; class=&quot;vb codecolorer&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt; Ordinal(Number &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Long&lt;/span&gt;) &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;&lt;br&gt;
&#160; Ordinal = Number &amp; Mid$(&lt;span class=&quot;st0&quot;&gt;&quot;thstndrdthththththth&quot;&lt;/span&gt;, 1 - 2 * ((Number) &lt;span class=&quot;kw1&quot;&gt;Mod&lt;/span&gt; 10) * (Abs((Number) &lt;span class=&quot;kw1&quot;&gt;Mod&lt;/span&gt; 100 - 12) &gt; 1), 2)&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This function was actually the starting point for the formula I posted a few minutes ago.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>While Greg posted his function about a year-and-a-half ago, I thought anyone into VB code might be interested in this one-liner function I&#8217;ve posted several times in the past in the compiled VB newsgroups (it works for all numbers, not just date day numbers like Greg&#8217;s function)&#8230;</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container vb default">
<div style="white-space: nowrap;" class="vb codecolorer"><span class="kw1">Function</span> Ordinal(Number <span class="kw1">As</span> <span class="kw1">Long</span>) <span class="kw1">As</span> <span class="kw1">String</span><br />
&nbsp; Ordinal = Number &amp; Mid$(<span class="st0">&#8220;thstndrdthththththth&#8221;</span>, 1 &#8211; 2 * ((Number) <span class="kw1">Mod</span> 10) * (Abs((Number) <span class="kw1">Mod</span> 100 &#8211; 12) &gt; 1), 2)<br />
<span class="kw1">End</span> <span class="kw1">Function</span></div>
</div>
<p>This function was actually the starting point for the formula I posted a few minutes ago.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Squiggler</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/19/ordinal-days/#comment-55573</link>
		<dc:creator>Squiggler</dc:creator>
		<pubDate>Wed, 08 Dec 2010 06:13:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=689#comment-55573</guid>
		<description>&lt;p&gt;It may be the shortest, but the one above has less references to change!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>It may be the shortest, but the one above has less references to change!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick Rothstein (MVP - Excel)</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/19/ordinal-days/#comment-55572</link>
		<dc:creator>Rick Rothstein (MVP - Excel)</dc:creator>
		<pubDate>Wed, 08 Dec 2010 06:08:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=689#comment-55572</guid>
		<description>&lt;p&gt;Biff (posts under the name T. Valko) and I jointly came up with this formula a couple of years ago or so... we believe it is the shortest formula to place an ordinal suffix on an whole number...&lt;/p&gt;
&lt;p&gt;=A1&amp;MID(&quot;thstndrdth&quot;,MIN(9,2*RIGHT(A1)*(MOD(A1-11,100)&gt;2)+1),2)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Biff (posts under the name T. Valko) and I jointly came up with this formula a couple of years ago or so&#8230; we believe it is the shortest formula to place an ordinal suffix on an whole number&#8230;</p>
<p>=A1&amp;MID(&#8220;thstndrdth&#8221;,MIN(9,2*RIGHT(A1)*(MOD(A1-11,100)&gt;2)+1),2)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Squiggler</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/19/ordinal-days/#comment-55512</link>
		<dc:creator>Squiggler</dc:creator>
		<pubDate>Mon, 06 Dec 2010 23:10:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=689#comment-55512</guid>
		<description>&lt;p&gt;=Value&amp;MID(REPLACE(REPT(&quot;thstndrdthththththth&quot;,10),23,6,&quot;ththth&quot;),MOD(Value,100)*2+1,2)&lt;/p&gt;
&lt;p&gt;Will work for any value!&lt;/p&gt;
&lt;p&gt;=Value&amp;MID(REPLACE(REPT(&quot;thstndrdthththththth&quot;,4),23,6,&quot;ththth&quot;),Value*2+1,2)&lt;/p&gt;
&lt;p&gt;If used on dates&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>=Value&amp;MID(REPLACE(REPT(&#8220;thstndrdthththththth&#8221;,10),23,6,&#8221;ththth&#8221;),MOD(Value,100)*2+1,2)</p>
<p>Will work for any value!</p>
<p>=Value&amp;MID(REPLACE(REPT(&#8220;thstndrdthththththth&#8221;,4),23,6,&#8221;ththth&#8221;),Value*2+1,2)</p>
<p>If used on dates</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/19/ordinal-days/#comment-40126</link>
		<dc:creator>Greg</dc:creator>
		<pubDate>Thu, 02 Jul 2009 15:44:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=689#comment-40126</guid>
		<description>&lt;p&gt;And for some reason in my reply above its not showing the amp.  You have to remove the &quot;&amp; a m p ;&quot;  If anyone can explain this I would appreciate it.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>And for some reason in my reply above its not showing the amp.  You have to remove the &#8220;&amp; a m p ;&#8221;  If anyone can explain this I would appreciate it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/19/ordinal-days/#comment-40125</link>
		<dc:creator>Greg</dc:creator>
		<pubDate>Thu, 02 Jul 2009 15:37:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=689#comment-40125</guid>
		<description>&lt;p&gt;For some reason when it was copied and pasted it added the &quot;&amp;&quot;.  I no longer have the file because I was using it over a network and it was giving me problems so I just deleted it.  But I believe that you can just remove the &amp;&lt;/p&gt;
&lt;p&gt;Thanks for trying it out&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>For some reason when it was copied and pasted it added the &#8220;&amp;&#8221;.  I no longer have the file because I was using it over a network and it was giving me problems so I just deleted it.  But I believe that you can just remove the &amp;</p>
<p>Thanks for trying it out</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Boris</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/19/ordinal-days/#comment-40106</link>
		<dc:creator>Boris</dc:creator>
		<pubDate>Thu, 02 Jul 2009 09:56:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=689#comment-40106</guid>
		<description>&lt;p&gt;@Greg &lt;/p&gt;
&lt;p&gt;I get an error with your function&lt;br&gt;
&amp;amp &gt;;&lt; Ext&lt;/p&gt;
&lt;p&gt;Compile Error&lt;br&gt;
Expected End of Statement&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@Greg </p>
<p>I get an error with your function<br />
&amp;amp &gt;;&lt; Ext</p>
<p>Compile Error<br />
Expected End of Statement</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/19/ordinal-days/#comment-39121</link>
		<dc:creator>Greg</dc:creator>
		<pubDate>Thu, 23 Apr 2009 22:39:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=689#comment-39121</guid>
		<description>&lt;p&gt;New to VB code, but it was fun and a challenge.  This is what I came up with to label a header row based on a week ending date.&lt;/p&gt;
&lt;div style=&quot;overflow: auto; white-space: nowrap;&quot; class=&quot;codecolorer-container vb default&quot;&gt;&lt;div style=&quot;white-space: nowrap;&quot; class=&quot;vb codecolorer&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt; DayEx(InputDate &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Date&lt;/span&gt;)&lt;br&gt;
&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; DayNumber &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; Ext &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;&lt;br&gt;
&#160; &#160; DayNumber = Day(InputDate)&lt;br&gt;
&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;Select&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Case&lt;/span&gt; DayNumber&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Case&lt;/span&gt; 1, 21, 31&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; Ext = &lt;span class=&quot;st0&quot;&gt;&quot;st&quot;&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Case&lt;/span&gt; 2, 22&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; Ext = &lt;span class=&quot;st0&quot;&gt;&quot;nd&quot;&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Case&lt;/span&gt; 3, 23&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; Ext = &lt;span class=&quot;st0&quot;&gt;&quot;rd&quot;&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Case&lt;/span&gt; 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 24, 25, 26, 27, 28, 29, 30&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; Ext = &lt;span class=&quot;st0&quot;&gt;&quot;th&quot;&lt;/span&gt;&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Select&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
&#160; &#160; DayEx = DayNumber &amp; Ext&lt;br&gt;
&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;You can now use it like this...if cell K1=5/3/09&lt;/p&gt;
&lt;p&gt;then..&lt;/p&gt;
&lt;p&gt;=Dayex($K$1-7) gives you 26th&lt;br&gt;
=Dayex($K$1-6) gives you 27th&lt;br&gt;
=Dayex($K$1-5) gives you 28th&lt;br&gt;
=Dayex($K$1-4) gives you 29th&lt;br&gt;
=Dayex($K$1-3) gives you 30th&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>New to VB code, but it was fun and a challenge.  This is what I came up with to label a header row based on a week ending date.</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container vb default">
<div style="white-space: nowrap;" class="vb codecolorer"><span class="kw1">Function</span> DayEx(InputDate <span class="kw1">As</span> <span class="kw1">Date</span>)</p>
<p><span class="kw1">Dim</span> DayNumber <span class="kw1">As</span> <span class="kw1">String</span><br />
<span class="kw1">Dim</span> Ext <span class="kw1">As</span> <span class="kw1">String</span><br />
&nbsp; &nbsp; DayNumber = Day(InputDate)</p>
<p><span class="kw1">Select</span> <span class="kw1">Case</span> DayNumber<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">Case</span> 1, 21, 31<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Ext = <span class="st0">&#8220;st&#8221;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">Case</span> 2, 22<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Ext = <span class="st0">&#8220;nd&#8221;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">Case</span> 3, 23<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Ext = <span class="st0">&#8220;rd&#8221;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">Case</span> 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 24, 25, 26, 27, 28, 29, 30<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Ext = <span class="st0">&#8220;th&#8221;</span><br />
<span class="kw1">End</span> <span class="kw1">Select</span></p>
<p>&nbsp; &nbsp; DayEx = DayNumber &amp;amp; Ext</p>
<p><span class="kw1">End</span> <span class="kw1">Function</span></div>
</div>
<p>You can now use it like this&#8230;if cell K1=5/3/09</p>
<p>then..</p>
<p>=Dayex($K$1-7) gives you 26th<br />
=Dayex($K$1-6) gives you 27th<br />
=Dayex($K$1-5) gives you 28th<br />
=Dayex($K$1-4) gives you 29th<br />
=Dayex($K$1-3) gives you 30th</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert B</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/19/ordinal-days/#comment-36011</link>
		<dc:creator>Robert B</dc:creator>
		<pubDate>Mon, 10 Nov 2008 00:39:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=689#comment-36011</guid>
		<description>&lt;p&gt;=CHOOSE(MIN(5,MOD(A1,10)*(MOD(INT(A1/10),10)!=1)+1),&quot;th&quot;,&quot;st&quot;,&quot;nd&quot;,&quot;rd&quot;,&quot;th&quot;)&lt;br&gt;
where != is &#039;not equals&#039;&lt;br&gt;
comment form does not permit &quot;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>=CHOOSE(MIN(5,MOD(A1,10)*(MOD(INT(A1/10),10)!=1)+1),&#8221;th&#8221;,&#8221;st&#8221;,&#8221;nd&#8221;,&#8221;rd&#8221;,&#8221;th&#8221;)<br />
where != is &#8216;not equals&#8217;<br />
comment form does not permit &#8220;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

