<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>アルファベット | nujonoa_blog</title>
	<atom:link href="https://nujonoa.com/tag/%e3%82%a2%e3%83%ab%e3%83%95%e3%82%a1%e3%83%99%e3%83%83%e3%83%88/feed/" rel="self" type="application/rss+xml" />
	<link>https://nujonoa.com</link>
	<description>人生に役立つデータ集</description>
	<lastBuildDate>Fri, 29 Jan 2021 14:12:50 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>

<image>
	<url>https://nujonoa.com/wp-content/uploads/2019/04/cropped-DSC00976-e1554456145409-32x32.jpg</url>
	<title>アルファベット | nujonoa_blog</title>
	<link>https://nujonoa.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>【VBA】列の英語→数字に変換する方法</title>
		<link>https://nujonoa.com/vba-convert-english-to-numbers/</link>
					<comments>https://nujonoa.com/vba-convert-english-to-numbers/#respond</comments>
		
		<dc:creator><![CDATA[nujonoa]]></dc:creator>
		<pubDate>Fri, 29 Jan 2021 14:12:49 +0000</pubDate>
				<category><![CDATA[マクロVBA]]></category>
		<category><![CDATA[vba]]></category>
		<category><![CDATA[列]]></category>
		<category><![CDATA[アルファベット]]></category>
		<category><![CDATA[数字]]></category>
		<guid isPermaLink="false">http://nujonoa.com/?p=8707</guid>

					<description><![CDATA[VBAでプログラムを組んでいると、正直R1C1表記で行きたいところが、自分以外でも使うことを考えて、そのままの設定で行くことが多いです。 そんな時に困るのが、列の英語(アルファベット)と数字の対比です。 今回はそんな列の [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>VBAでプログラムを組んでいると、正直R1C1表記で行きたいところが、<br>自分以外でも使うことを考えて、そのままの設定で行くことが多いです。</p>



<p>そんな時に困るのが、列の英語(アルファベット)と数字の対比です。</p>



<p>今回はそんな列の英語を数字にする方法を紹介していきたいと思います。</p>




  <div id="toc" class="toc tnt-number toc-center tnt-number border-element"><input type="checkbox" class="toc-checkbox" id="toc-checkbox-2" checked><label class="toc-title" for="toc-checkbox-2">目次</label>
    <div class="toc-content">
    <ol class="toc-list open"><li><a href="#toc1" tabindex="0">【VBA】列の英語(アルファベット)⇒数字に変換する方法</a></li><li><a href="#toc2" tabindex="0">プログラムの説明</a></li><li><a href="#toc3" tabindex="0">≪参考≫数字→アルファベット</a></li></ol>
    </div>
  </div>

<h2 class="wp-block-heading"><span id="toc1">【VBA】列の英語(アルファベット)⇒数字に変換する方法</span></h2>



<p>列の英語を数字に変換する方法は、<br>下記のとおりです。※ダブルクリックしてコピーできます。</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: vb; title: ; notranslate">
Sub AA()

'英語→数字に変換
    RETU = InputBox(&quot;列名(英語)を入力&quot;, , &quot;AU&quot;)
    RETUN = Cells(1, RETU).Column
    MsgBox RETUN
'&lt;参考&gt;数字→英語に変換
    Dim RETU2 As Integer
    RETU2 = InputBox(&quot;数字を入力&quot;, , &quot;95&quot;)
    RETUN2 = Cells(2, RETU2).Address(ColumnAbsolute:=False)
    RETUN2 = Left(RETUN2, InStr(RETUN2, &quot;$&quot;) - 1)
    MsgBox RETUN2

End Sub
</pre></div>


<h2 class="wp-block-heading"><span id="toc2">プログラムの説明</span></h2>



<p>実は、CELLSの使い方として</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: vb; title: ; notranslate">
Cells(1, &quot;C&quot;)
</pre></div>


<p>と表記すると、セル「C1」を選択することが可能です。<br>こんな使い方をする人は少ないので知られていませんが。。</p>



<p>ですので、セルの.Columnと組み合わせて、</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: vb; title: ; notranslate">
Cells(1, &quot;C&quot;).Column
</pre></div>


<p>で、セルの英語を数字に変換することが可能です。</p>



<p>charなどを用いる方法がありますが、これが一番簡単だと思います。</p>



<h2 class="wp-block-heading"><span id="toc3">≪参考≫数字→アルファベット</span></h2>



<p>参考までに数字→アルファベットに変換する方法は、</p>



<p>.Address(ColumnAbsolute:=False)</p>



<p>を用いて、セルのアドレスを「CA$1」で表し、</p>



<p>「InStr("CA$1", "$")」で$を検索。その前までの英語を取り出します。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nujonoa.com/vba-convert-english-to-numbers/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
