<?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: VBA Routine to return Column Letter of Cell</title>
	<atom:link href="http://www.automateexcel.com/2008/11/04/vba-routine-to-return-column-letter-of-cell/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.automateexcel.com/2008/11/04/vba-routine-to-return-column-letter-of-cell/</link>
	<description>Hundreds of Excel Tips &#38; Tricks</description>
	<lastBuildDate>Wed, 10 Mar 2010 07:03:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Rick Rothstein (MVP - Excel)</title>
		<link>http://www.automateexcel.com/2008/11/04/vba-routine-to-return-column-letter-of-cell/comment-page-1/#comment-1387</link>
		<dc:creator>Rick Rothstein (MVP - Excel)</dc:creator>
		<pubDate>Sat, 26 Dec 2009 21:29:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.automateexcel.com/?p=1115#comment-1387</guid>
		<description>@Andyman

Two points... First, you don&#039;t really need the row to be specified as you can use hard code any row number into the Cells property call (I would suggest using 1) since the column letter is not dependent on the row number. Second, you code will return the wrong answer if the column number is greater than 26.</description>
		<content:encoded><![CDATA[<p>@Andyman</p>
<p>Two points&#8230; First, you don&#8217;t really need the row to be specified as you can use hard code any row number into the Cells property call (I would suggest using 1) since the column letter is not dependent on the row number. Second, you code will return the wrong answer if the column number is greater than 26.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andyman</title>
		<link>http://www.automateexcel.com/2008/11/04/vba-routine-to-return-column-letter-of-cell/comment-page-1/#comment-1384</link>
		<dc:creator>Andyman</dc:creator>
		<pubDate>Sat, 19 Dec 2009 12:17:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.automateexcel.com/?p=1115#comment-1384</guid>
		<description>Came up with this not too long ago:

Sub GetColumn(ByVal row As Integer, ByVal col As Integer, ByRef letter As String)
    addr = Sheet1.Cells(row, col).Address(False, False)
    letter = Left(addr, 1)
End Sub

Called like this:

Call GetColumn(r, c, colLetter)

Doing that stores the column letter in the variable colLetter.  Integers can be input for r and c to indicate which cell you are talking about.</description>
		<content:encoded><![CDATA[<p>Came up with this not too long ago:</p>
<p>Sub GetColumn(ByVal row As Integer, ByVal col As Integer, ByRef letter As String)<br />
    addr = Sheet1.Cells(row, col).Address(False, False)<br />
    letter = Left(addr, 1)<br />
End Sub</p>
<p>Called like this:</p>
<p>Call GetColumn(r, c, colLetter)</p>
<p>Doing that stores the column letter in the variable colLetter.  Integers can be input for r and c to indicate which cell you are talking about.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick Rothstein (MVP - Excel)</title>
		<link>http://www.automateexcel.com/2008/11/04/vba-routine-to-return-column-letter-of-cell/comment-page-1/#comment-1374</link>
		<dc:creator>Rick Rothstein (MVP - Excel)</dc:creator>
		<pubDate>Sun, 13 Dec 2009 03:19:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.automateexcel.com/?p=1115#comment-1374</guid>
		<description>Here is the UDF that I use...

Function ColumnLetter(Cell_Add As Range) As String
  ColumnLetter = Split(Cell_Add.Address, &quot;$&quot;)(1)
End Function</description>
		<content:encoded><![CDATA[<p>Here is the UDF that I use&#8230;</p>
<p>Function ColumnLetter(Cell_Add As Range) As String<br />
  ColumnLetter = Split(Cell_Add.Address, &#8220;$&#8221;)(1)<br />
End Function</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marque Hernandez</title>
		<link>http://www.automateexcel.com/2008/11/04/vba-routine-to-return-column-letter-of-cell/comment-page-1/#comment-1276</link>
		<dc:creator>Marque Hernandez</dc:creator>
		<pubDate>Tue, 14 Jul 2009 23:29:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.automateexcel.com/?p=1115#comment-1276</guid>
		<description>Thank you Andy Pope!  You saved me a whole lotta time and effort!  This is exactly what I needed since I can&#039;t write VBA (yet!).</description>
		<content:encoded><![CDATA[<p>Thank you Andy Pope!  You saved me a whole lotta time and effort!  This is exactly what I needed since I can&#8217;t write VBA (yet!).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kev</title>
		<link>http://www.automateexcel.com/2008/11/04/vba-routine-to-return-column-letter-of-cell/comment-page-1/#comment-1062</link>
		<dc:creator>Kev</dc:creator>
		<pubDate>Thu, 20 Nov 2008 12:08:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.automateexcel.com/?p=1115#comment-1062</guid>
		<description>=LEFT(ADDRESS(ROW(),COLUMN(),4),LEN(ADDRESS(ROW(),COLUMN(),4))-LEN(ROW()))


works fine for me.</description>
		<content:encoded><![CDATA[<p>=LEFT(ADDRESS(ROW(),COLUMN(),4),LEN(ADDRESS(ROW(),COLUMN(),4))-LEN(ROW()))</p>
<p>works fine for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Pope</title>
		<link>http://www.automateexcel.com/2008/11/04/vba-routine-to-return-column-letter-of-cell/comment-page-1/#comment-1006</link>
		<dc:creator>Andy Pope</dc:creator>
		<pubDate>Wed, 05 Nov 2008 16:24:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.automateexcel.com/?p=1115#comment-1006</guid>
		<description>I would use worksheet formula

=SUBSTITUTE(ADDRESS(1,COLUMN(AD12),2),&quot;$1&quot;,&quot;&quot;)

Or UDF

Function ColumnLetter(Cell_Add) As String
    ColumnLetter = Replace(Cell_Add.EntireColumn.Cells(1).Address(, False), &quot;$1&quot;, &quot;&quot;)
End Function</description>
		<content:encoded><![CDATA[<p>I would use worksheet formula</p>
<p>=SUBSTITUTE(ADDRESS(1,COLUMN(AD12),2),&#8221;$1&#8243;,&#8221;")</p>
<p>Or UDF</p>
<p>Function ColumnLetter(Cell_Add) As String<br />
    ColumnLetter = Replace(Cell_Add.EntireColumn.Cells(1).Address(, False), &#8220;$1&#8243;, &#8220;&#8221;)<br />
End Function</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://www.automateexcel.com/2008/11/04/vba-routine-to-return-column-letter-of-cell/comment-page-1/#comment-1003</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Tue, 04 Nov 2008 13:55:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.automateexcel.com/?p=1115#comment-1003</guid>
		<description>I did this UDF before I saw Nick&#039;s simple worksheet formula. Both are simpler than the original.

Public Function ColumnLetters(rng As Range)
  Dim sAddr As String
  Dim sTrim As String
  
  sAddr = rng.Address(True, True, xlA1)
  sTrim = Mid(sAddr, 2)
  sTrim = Left(sTrim, InStr(sTrim, &quot;$&quot;) - 1)
  
  ColumnLetters = sTrim
End Function</description>
		<content:encoded><![CDATA[<p>I did this UDF before I saw Nick&#8217;s simple worksheet formula. Both are simpler than the original.</p>
<p>Public Function ColumnLetters(rng As Range)<br />
  Dim sAddr As String<br />
  Dim sTrim As String</p>
<p>  sAddr = rng.Address(True, True, xlA1)<br />
  sTrim = Mid(sAddr, 2)<br />
  sTrim = Left(sTrim, InStr(sTrim, &#8220;$&#8221;) &#8211; 1)</p>
<p>  ColumnLetters = sTrim<br />
End Function</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick Burns</title>
		<link>http://www.automateexcel.com/2008/11/04/vba-routine-to-return-column-letter-of-cell/comment-page-1/#comment-1001</link>
		<dc:creator>Nick Burns</dc:creator>
		<pubDate>Tue, 04 Nov 2008 06:37:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.automateexcel.com/?p=1115#comment-1001</guid>
		<description>Couldn&#039;t all that for determining the column letter be reduced to this:

Alpha_Column = Mid(Cell_Add.Address, 2, InStr(2, Cell_Add.Address, &quot;$&quot;) - 2)</description>
		<content:encoded><![CDATA[<p>Couldn&#8217;t all that for determining the column letter be reduced to this:</p>
<p>Alpha_Column = Mid(Cell_Add.Address, 2, InStr(2, Cell_Add.Address, &#8220;$&#8221;) &#8211; 2)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stan Scott</title>
		<link>http://www.automateexcel.com/2008/11/04/vba-routine-to-return-column-letter-of-cell/comment-page-1/#comment-1000</link>
		<dc:creator>Stan Scott</dc:creator>
		<pubDate>Tue, 04 Nov 2008 05:58:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.automateexcel.com/?p=1115#comment-1000</guid>
		<description>I always use this:

Function Alpha_Column(Cell_Add as Range)
     Alpha_Column = Replace(Replace(Cell_Add,&quot;$&quot;,&quot;&quot;),Row(Cell_Add),&quot;&quot;)
End Function

Stan</description>
		<content:encoded><![CDATA[<p>I always use this:</p>
<p>Function Alpha_Column(Cell_Add as Range)<br />
     Alpha_Column = Replace(Replace(Cell_Add,&#8221;$&#8221;,&#8221;"),Row(Cell_Add),&#8221;")<br />
End Function</p>
<p>Stan</p>
]]></content:encoded>
	</item>
</channel>
</rss>
