<?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>ColorIndex  |  独学エクセル塾</title>
	<atom:link href="https://dokugakuexcel.com/tag/colorindex/feed/" rel="self" type="application/rss+xml" />
	<link>https://dokugakuexcel.com</link>
	<description>初心者から中級者までシステム・関数・VBAを伝授します</description>
	<lastBuildDate>Thu, 13 Jul 2023 07:13:19 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://dokugakuexcel.com/wp-content/uploads/2021/06/cropped-cropped-image-66-1-32x32.jpg</url>
	<title>ColorIndex  |  独学エクセル塾</title>
	<link>https://dokugakuexcel.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">194648711</site>	<item>
		<title>【マクロVBA】文字に色をつける・設定・変更！ Font.ColorとRGB・Index・定数で変更</title>
		<link>https://dokugakuexcel.com/%e3%80%90%e3%83%9e%e3%82%af%e3%83%advba%e3%80%91%e6%96%87%e5%ad%97%e3%81%ab%e8%89%b2%e3%82%92%e3%81%a4%e3%81%91%e3%82%8b%e3%83%bb%e8%a8%ad%e5%ae%9a%e3%83%bb%e5%a4%89%e6%9b%b4%ef%bc%81-font-color/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=%25e3%2580%2590%25e3%2583%259e%25e3%2582%25af%25e3%2583%25advba%25e3%2580%2591%25e6%2596%2587%25e5%25ad%2597%25e3%2581%25ab%25e8%2589%25b2%25e3%2582%2592%25e3%2581%25a4%25e3%2581%2591%25e3%2582%258b%25e3%2583%25bb%25e8%25a8%25ad%25e5%25ae%259a%25e3%2583%25bb%25e5%25a4%2589%25e6%259b%25b4%25ef%25bc%2581-font-color</link>
					<comments>https://dokugakuexcel.com/%e3%80%90%e3%83%9e%e3%82%af%e3%83%advba%e3%80%91%e6%96%87%e5%ad%97%e3%81%ab%e8%89%b2%e3%82%92%e3%81%a4%e3%81%91%e3%82%8b%e3%83%bb%e8%a8%ad%e5%ae%9a%e3%83%bb%e5%a4%89%e6%9b%b4%ef%bc%81-font-color/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[matsu]]></dc:creator>
		<pubDate>Wed, 28 Sep 2022 15:00:07 +0000</pubDate>
				<category><![CDATA[文字操作]]></category>
		<category><![CDATA[マクロVBA]]></category>
		<category><![CDATA[文字の色]]></category>
		<category><![CDATA[Font.Color]]></category>
		<category><![CDATA[RGB]]></category>
		<category><![CDATA[ColorIndex]]></category>
		<guid isPermaLink="false">https://dokugakuexcel.com/?p=3555</guid>

					<description><![CDATA[エクセルの機能で文字に色をつける機能はよく使用すると思います。通常の文字に色をつける方法についてはこちらから☟ 【基本操作】初心者必見！エクセルで文字のフォント・色・大きさ・アンダーライン・太字への変え方 ► 独学エクセ [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>エクセルの機能で<strong><span class="marker-under">文字に色をつける</span></strong>機能はよく使用すると思います。<br />通常の文字に色をつける方法についてはこちらから☟</p>



<p><a href="https://dokugakuexcel.com/%e5%9f%ba%e6%9c%ac%e6%93%8d%e4%bd%9c%e3%82%a8%e3%82%af%e3%82%bb%e3%83%ab%e3%81%a7%e6%96%87%e5%ad%97%e3%81%ae%e3%83%95%e3%82%a9%e3%83%b3%e3%83%88%e8%89%b2%e5%a4%a7%e3%81%8d%e3%81%95%e3%82%a2%e3%83%b3/">【基本操作】初心者必見！エクセルで文字のフォント・色・大きさ・アンダーライン・太字への変え方 ► 独学エクセル塾 (dokugakuexcel.com)</a></p>



<p>同じ動作をマクロVBAでも行うことができます。</p>



<p>様々な変更方法を紹介していますので是非参考にしてみてください。<br />それでは見ていきましょう。</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">&#x2b1b;︎忙しい人向けのコピペ用プログラム</a></li><li><a href="#toc2" tabindex="0">&#x2b1b;︎構文の仕組み</a></li><li><a href="#toc3" tabindex="0">&#x2b1b;︎文字に色をつける</a><ol><li><a href="#toc4" tabindex="0">・RGBで色をつける</a></li><li><a href="#toc5" tabindex="0">・ColorIndexで色を指定する</a></li><li><a href="#toc6" tabindex="0">・定数で色を指定する</a></li></ol></li><li><a href="#toc7" tabindex="0">&#x2b1b;︎オススメの文字に色をつける方法</a></li><li><a href="#toc8" tabindex="0">■練習問題</a></li><li><a href="#toc9" tabindex="0">&#x2b1b;︎公式の説明</a></li><li><a href="#toc10" tabindex="0">&#x2b1b;︎まとめ</a></li></ol>
    </div>
  </div>

<h2 class="wp-block-heading"><span id="toc1">&#x2b1b;︎忙しい人向けのコピペ用プログラム</span></h2>



<pre class="wp-block-verse">Sub RGBで変数を使用して文字の色を変える()

Dim Red As Long, Green As Long, Blue As Long

<span class="bold-red">Red </span>= 115 '任意のRの数値を入力
<span class="bold-green">Green</span> = 55 '任意のGの数値を入力
<span class="bold-blue">Blue</span> = 100 '任意のBの数値を入力

Range("A1:D5").Font.Color = RGB(<span class="bold-red">Red</span>,<span class="bold-green"> Green</span>, <span class="bold-blue">Blue</span>)

End Sub</pre>



<h2 class="wp-block-heading"><span id="toc2">&#x2b1b;︎構文の仕組み</span></h2>



<p>まずは構文を説明します。</p>



<p>&nbsp;</p>



<p><strong><span class="fz-20px">①RGBで色の指定をする</span></strong></p>



<pre class="wp-block-verse"><strong>Range(“色をつけたいセル”).Font.Color=RGB(<span class="bold-red">赤の要素</span>,<span class="bold-green">緑の要素</span>,<span class="bold-blue">青の要素</span>)</strong></pre>



<p>&nbsp;</p>



<p><span class="fz-20px"><strong>②ColorIndexで色を指定する</strong></span></p>



<pre class="wp-block-verse"><strong>Range(“色をつけたいセル”).Font.ColorIndex=<span class="bold-red">インデックス番号</span></strong></pre>



<p>&nbsp;</p>



<p><strong><span class="fz-20px">③定数で色を指定する</span></strong></p>



<pre class="wp-block-verse"><strong>Range(“色をつけたいセル”).Font.Color=<span class="bold-red">色の定数</span></strong></pre>



<p>&nbsp;</p>



<p>※色の種類は下記の表参照</p>



<figure class="wp-block-table">
<table>
<thead>
<tr>
<th>定数</th>
<th>文字の色</th>
</tr>
</thead>
<tbody>
<tr>
<td>vbBlack</td>
<td>黒</td>
</tr>
<tr>
<td>vbRed</td>
<td>赤</td>
</tr>
<tr>
<td>vbGreen</td>
<td>緑</td>
</tr>
<tr>
<td>vbYellow</td>
<td>黄</td>
</tr>
<tr>
<td>vbBlue</td>
<td>青</td>
</tr>
<tr>
<td>vbMagenta</td>
<td>紫</td>
</tr>
<tr>
<td>vbCyan</td>
<td>シアン</td>
</tr>
<tr>
<td>vbWhite</td>
<td>白</td>
</tr>
</tbody>
</table>
</figure>



<h2 class="wp-block-heading"><span id="toc3">&#x2b1b;︎文字に色をつける</span></h2>



<p>構文では「RGB」「ColorIndex」「定数」での文字に色をつける構文を紹介しました。</p>



<p>では、実際に各内容を見ていきましょう。</p>



<h3 class="wp-block-heading"><span id="toc4">・RGBで色をつける</span></h3>



<p>まずは<strong><span class="marker-under">RGBで色をつける方法</span></strong>を見ていきましょう。<br /><strong>RGB</strong>とは「<span class="bold-red">RED:赤</span>」「<span class="bold-green">Green:緑</span>」「<span class="bold-blue">Blue:青</span>」の原色を意味しており、<br />この3色を混ぜて色を指定します。</p>



<p><strong><span class="marker-under">各数値は「0から255」で指定します。</span></strong><br />では構文を再度確認しましょう。</p>



<pre class="wp-block-verse"><strong>Range(“色をつけたいセル”).Font.Color=RGB(<span class="bold-red">赤の要素</span>,<span class="bold-green">緑の要素</span>,<span class="bold-blue">青の要素</span>)</strong></pre>



<p>文字に色をつけたいセルは番地で指定します。<br />例えばB3の文字を指定するときはRange(“B3”)となります。</p>



<p>Range(“A1:D5”)のように複数範囲でも対応可能です。</p>



<p>一方、RGBの方はRGB(<span class="bold-red">赤の要素</span>,<span class="bold-green">緑の要素</span>,<span class="bold-blue">青の要素</span>)のように指示します。</p>



<p>ちなみに各要素の数値が大きければ各原色は濃くなります。<br />一例を紹介すると下記の通りです。</p>



<pre class="wp-block-verse">白:RGB(0,0,0)<br />黒:RGB(255,255,255)<br />赤:RGB(255,0,0)<br />黄色:RGB(255,255,0)<br />青:RGB(0,0,255)</pre>



<p>では実際にプログラムを作成してみましょう。</p>



<p>今回は例で「A1:D5」の文字を「赤」にしたいと思います。<br />プログラムはこのようになります。</p>



<pre class="wp-block-verse">Sub RGBで文字の色を変える()
Range("A1:D5").Font.Color = RGB(<span class="bold-red">255</span>, <span class="bold-green">0</span>,<span class="bold-blue"> 0</span>)
End Sub</pre>



<p>では実行してみましょう。<br />結果はこのようになりました。</p>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="732" height="231" class="wp-image-3557" src="https://dokugakuexcel.com/wp-content/uploads/2022/09/image-106.png" alt="" srcset="https://dokugakuexcel.com/wp-content/uploads/2022/09/image-106.png 732w, https://dokugakuexcel.com/wp-content/uploads/2022/09/image-106-300x95.png 300w" sizes="(max-width: 732px) 100vw, 732px" /></figure>



<p>A1からD5の文字が赤くなりましたね。</p>



<p>&nbsp;</p>



<p>ちなみ<strong><span class="marker-under">RGBの数値を知りたい場合はその他の色から確認</span></strong>が可能です。</p>



<p><strong><span class="marker-under-red">「ホーム」</span></strong>タブの<strong><span class="marker-under-red">「フォントの色」に「v」</span></strong>がありますよね。</p>



<figure class="wp-block-image size-full is-resized"><img decoding="async" class="wp-image-3558" src="https://dokugakuexcel.com/wp-content/uploads/2022/09/image-107.png" alt="" width="372" height="162" srcset="https://dokugakuexcel.com/wp-content/uploads/2022/09/image-107.png 521w, https://dokugakuexcel.com/wp-content/uploads/2022/09/image-107-300x131.png 300w" sizes="(max-width: 372px) 100vw, 372px" /></figure>



<p>そちらを押すと下に「<strong><span class="marker-under-red">その他の色</span></strong>」があります。</p>



<figure class="wp-block-image size-full is-resized"><img decoding="async" class="wp-image-3559" src="https://dokugakuexcel.com/wp-content/uploads/2022/09/image-108.png" alt="" width="245" height="290" srcset="https://dokugakuexcel.com/wp-content/uploads/2022/09/image-108.png 396w, https://dokugakuexcel.com/wp-content/uploads/2022/09/image-108-253x300.png 253w" sizes="(max-width: 245px) 100vw, 245px" /></figure>



<p>そこで<strong><span class="marker-under-red">「ユーザー設定」</span></strong>を選択すると<strong><span class="marker-under-red">「RGB」</span></strong>の値が確認できます。</p>



<figure class="wp-block-image size-full is-resized"><img decoding="async" class="wp-image-3560" src="https://dokugakuexcel.com/wp-content/uploads/2022/09/image-109.png" alt="" width="304" height="326" srcset="https://dokugakuexcel.com/wp-content/uploads/2022/09/image-109.png 422w, https://dokugakuexcel.com/wp-content/uploads/2022/09/image-109-280x300.png 280w" sizes="(max-width: 304px) 100vw, 304px" /></figure>



<h3 class="wp-block-heading"><span id="toc5">・ColorIndexで色を指定する</span></h3>



<p>今度は<strong><span class="marker-under">「ColorIndex」で文字に色をつける方法</span></strong>を紹介します。<br />ColorIndexは設定によって変わっており、<strong><span class="marker-under">「1から56」</span></strong>で指定します。</p>



<p>ではColorIndexの設定色を確認してみましょう。</p>



<p>まず、<strong><span class="marker-under-red">「ファイル」</span></strong>タブの<strong><span class="marker-under-red">「オプション」</span></strong>を選択します。</p>



<figure class="wp-block-image size-full is-resized"><img decoding="async" class="wp-image-3561" src="https://dokugakuexcel.com/wp-content/uploads/2022/09/image-110.png" alt="" width="271" height="299" srcset="https://dokugakuexcel.com/wp-content/uploads/2022/09/image-110.png 378w, https://dokugakuexcel.com/wp-content/uploads/2022/09/image-110-272x300.png 272w" sizes="(max-width: 271px) 100vw, 271px" /></figure>



<p>そこから<strong><span class="marker-under-red">「保存」</span></strong>を選択し、<strong><span class="marker-under-red">「ブックの外観の保持」</span></strong>を見てみましょう。</p>



<figure class="wp-block-image size-large is-resized"><img decoding="async" class="wp-image-3562" src="https://dokugakuexcel.com/wp-content/uploads/2022/09/image-111-1024x725.png" alt="" width="555" height="393" srcset="https://dokugakuexcel.com/wp-content/uploads/2022/09/image-111-1024x725.png 1024w, https://dokugakuexcel.com/wp-content/uploads/2022/09/image-111-300x212.png 300w, https://dokugakuexcel.com/wp-content/uploads/2022/09/image-111-768x543.png 768w, https://dokugakuexcel.com/wp-content/uploads/2022/09/image-111.png 1173w" sizes="(max-width: 555px) 100vw, 555px" /></figure>



<p>その中の<strong><span class="marker-under-red">「色」</span></strong>を選択してみましょう。<br />すると56色の色が表示されます。</p>



<figure class="wp-block-image size-full is-resized"><img decoding="async" class="wp-image-3563" src="https://dokugakuexcel.com/wp-content/uploads/2022/09/image-112.png" alt="" width="571" height="395" srcset="https://dokugakuexcel.com/wp-content/uploads/2022/09/image-112.png 917w, https://dokugakuexcel.com/wp-content/uploads/2022/09/image-112-300x207.png 300w, https://dokugakuexcel.com/wp-content/uploads/2022/09/image-112-768x531.png 768w" sizes="(max-width: 571px) 100vw, 571px" /></figure>



<p><strong><span class="marker-under">この色を基にColorIndexの色が割り振られます。</span></strong></p>



<p>なのでColorIndexの色はカスタマイズが可能ということです。</p>



<p>では文字に色をつけてみましょう。<br />構文はこのようになります。</p>



<pre class="wp-block-verse"><strong>Range(“色をつけたいセル”).Font.ColorIndex=<span class="bold-red">インデックス番号</span></strong></pre>



<p>文字に色をつけたいセルは先程と同様に番地で指定します。</p>



<p><strong><span class="marker-under-red">インデックス番号は「1から56」の数値</span></strong>です。<br />今回は見本で「A1:D5」の範囲にインデックス番号「<span class="bold-red">5</span>」で実行してみましょう</p>



<p>プログラムはこのようになります。</p>



<pre class="wp-block-verse">Sub ColorIndexで文字の色を変える()
Range("A1:D5").Font.ColorIndex =<span class="bold-red"> 5</span>
End Sub</pre>



<p>それでは実行してみましょう。<br />結果はこのようになりました。</p>



<figure class="wp-block-image size-full"><img decoding="async" width="786" height="234" class="wp-image-3564" src="https://dokugakuexcel.com/wp-content/uploads/2022/09/image-113.png" alt="" srcset="https://dokugakuexcel.com/wp-content/uploads/2022/09/image-113.png 786w, https://dokugakuexcel.com/wp-content/uploads/2022/09/image-113-300x89.png 300w, https://dokugakuexcel.com/wp-content/uploads/2022/09/image-113-768x229.png 768w" sizes="(max-width: 786px) 100vw, 786px" /></figure>



<p>「A1からD5」の文字の色が青色になってますね。</p>



<p>では<strong><span class="marker-under">インデックス番号と色を確認するプログラム</span></strong>を紹介します。</p>



<pre class="wp-block-verse">Sub ColorIndexの設定色を確認する()<br />Dim R, C, ColorNo<br />ColorNo = 1<br />For C = 1 To 6 Step 1<br />For R = 1 To 10 Step 1<br />Cells(R, C).Font.ColorIndex = ColorNo<br />Cells(R, C) = ColorNo<br />ColorNo = ColorNo + 1<br />If ColorNo = 57 Then<br />Exit Sub<br />End If<br />Next R<br />Next C<br />End Sub</pre>



<p>実行した結果はこちらです。</p>



<figure class="wp-block-image size-full is-resized"><img decoding="async" class="wp-image-3565" src="https://dokugakuexcel.com/wp-content/uploads/2022/09/image-114.png" alt="" width="485" height="229" srcset="https://dokugakuexcel.com/wp-content/uploads/2022/09/image-114.png 899w, https://dokugakuexcel.com/wp-content/uploads/2022/09/image-114-300x142.png 300w, https://dokugakuexcel.com/wp-content/uploads/2022/09/image-114-768x364.png 768w" sizes="(max-width: 485px) 100vw, 485px" /></figure>



<p>この結果と、先程のブックの外観の保持の色を比較すると<br /><strong><span class="marker-under">インデックス番号と設定した色はバラバラに割り振られている</span></strong>ことがわかります。</p>



<p>上記プログラムを実行して、<br />設定がどうなっているのか確認するのも手ですね。</p>



<h3 class="wp-block-heading"><span id="toc6">・定数で色を指定する</span></h3>



<p>これまではRGBでの色の指定やColorIndexのインデックス番号のように<br />数値で色の指定をしましたが、今回は<strong><span class="marker-under">定数の文字で指定</span></strong>します。</p>



<p>構文は下記の通りです。</p>



<pre class="wp-block-verse"><strong>Range(“色をつけたいセル”).Font.Color=<span class="bold-red">色の定数</span></strong></pre>



<p>文字に色をつけたいセルはこれまでと同様に番地で指定します。</p>



<p>色の指定では下記表のように文字を入力します。</p>



<p>&nbsp;</p>



<figure class="wp-block-table">
<table>
<thead>
<tr>
<th>定数</th>
<th>文字の色</th>
</tr>
</thead>
<tbody>
<tr>
<td>vbBlack</td>
<td>黒</td>
</tr>
<tr>
<td>vbRed</td>
<td>赤</td>
</tr>
<tr>
<td>vbGreen</td>
<td>緑</td>
</tr>
<tr>
<td>vbYellow</td>
<td>黄</td>
</tr>
<tr>
<td>vbBlue</td>
<td>青</td>
</tr>
<tr>
<td>vbMagenta</td>
<td>紫</td>
</tr>
<tr>
<td>vbCyan</td>
<td>シアン</td>
</tr>
<tr>
<td>vbWhite</td>
<td>白</td>
</tr>
</tbody>
</table>
</figure>



<p>黒であれば「vbBlack」、緑であれば「vbGreen」のように<br />「vb」の後に色のスペルを入れるのが特徴です。</p>



<p>　<br />しかしこれだけでは種類が少ないですよね。</p>



<p>そこで「xl」の後に複雑な色を指定することも可能です。<br />リンクは下記を参照してください☟</p>



<p><a href="https://learn.microsoft.com/ja-jp/office/vba/api/excel.xlrgbcolor">XlRgbColor 列挙 (Excel) | Microsoft Learn</a><br />では見本を見ていきましょう。</p>



<p>今回は見本で「A1からD5」の範囲に定数を「<span class="bold-red">vbMagenta</span>」で実行してみましょう</p>



<p>プログラムはこのようになります。</p>



<pre class="wp-block-verse">Sub 定数で文字の色を変える()
Range("A1:D5").Font.Color =<span class="bold-red"> vbMagenta</span>
End Sub</pre>



<p>それでは実行してみましょう。<br />結果はこのようになりました。</p>



<figure class="wp-block-image size-full is-resized"><img decoding="async" class="wp-image-3566" src="https://dokugakuexcel.com/wp-content/uploads/2022/09/image-115.png" alt="" width="546" height="182" srcset="https://dokugakuexcel.com/wp-content/uploads/2022/09/image-115.png 883w, https://dokugakuexcel.com/wp-content/uploads/2022/09/image-115-300x101.png 300w, https://dokugakuexcel.com/wp-content/uploads/2022/09/image-115-768x257.png 768w" sizes="(max-width: 546px) 100vw, 546px" /></figure>



<p>「A1からD5」の文字の色が紫色になってますね。</p>



<h2 class="wp-block-heading"><span id="toc7">&#x2b1b;︎オススメの文字に色をつける方法</span></h2>



<p>これまで3つの文字に色をつける方法を紹介しましたが、<br /><strong><span class="marker-under">オススメを挙げるとすると「RGB」での指定</span></strong>になります。</p>



<p>理由としては下記の内容になります。</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p><strong>・色の調整や変更を計算や変数で応用できる<br />・RGBでの指定はどの条件でも変わらない（ColorIndexはPCの設定で変わる）</strong></p>
</blockquote>



<p>例を見ていきます。<br />下記のプログラムを用意しました。</p>



<pre class="wp-block-verse">Sub RGBで変数を使用して文字の色を変える()

Dim Red As Long, Green As Long, Blue As Long

<span class="bold-red">Red </span>= 115 '任意のRの数値を入力
<span class="bold-green">Green</span> = 55 '任意のGの数値を入力
<span class="bold-blue">Blue</span> = 100 '任意のBの数値を入力

Range("A1:D5").Font.Color = RGB(<span class="bold-red">Red</span>, <span class="bold-green">Green</span>, <span class="bold-blue">Blue</span>)

End Sub</pre>



<p>通常RGBの値を数値で入力していましたが、<br />見本のように変数を活用することができます。</p>
<p>&nbsp;</p>
<h2><span id="toc8">■練習問題</span></h2>
<p>練習問題も別の記事でまとめているので是非参考にしてみてください！</p>
<div class="alert-box common-icon-box"><a href="https://dokugakuexcel.com/%e3%80%90%e3%83%9e%e3%82%af%e3%83%advba%e7%b7%b4%e7%bf%92%e5%95%8f%e9%a1%8c8%e3%80%91%e8%89%b2%e3%81%ae%e5%a4%89%e6%9b%b4%ef%bc%81%e3%82%bb%e3%83%ab%e3%81%ae%e6%96%87%e5%ad%97%e8%89%b2%e3%82%84/">【マクロVBA練習問題9】色の変更！セルの文字色やセルの塗りつぶし色を変更する ► 独学エクセル塾 (dokugakuexcel.com)</a></div>
<div class="alert-box common-icon-box"><a href="https://dokugakuexcel.com/%e3%80%90%e3%83%9e%e3%82%af%e3%83%advba%e7%b7%b4%e7%bf%92%e5%95%8f%e9%a1%8c13%e3%80%91%e3%82%bb%e3%83%ab%e3%81%ae%e6%95%b0%e5%80%a4%e3%82%92%e5%85%83%e3%81%ab%e3%80%81%e6%9d%a1%e4%bb%b6%e3%81%ab/">【マクロVBA練習問題13】セルの数値を元に、条件に応じて文字色を変更！文字の色の変更方法 ► 独学エクセル塾 (dokugakuexcel.com)</a></div>



<h2 class="wp-block-heading"><span id="toc9">&#x2b1b;︎公式の説明</span></h2>



<p>わかりやすいように説明したため公式と使用する語句が異なりますが<br />マイクロソフト公式の説明については下記のリンクを参照してください。☟</p>



<p><a href="https://learn.microsoft.com/ja-jp/office/vba/api/excel.font.color">Font.Color プロパティ (Excel) | Microsoft Learn</a></p>



<h2 class="wp-block-heading"><span id="toc10">&#x2b1b;︎まとめ</span></h2>



<p>いかがだったでしょうか。<br />VBAでも文字の色を設定できるのは便利ですね。</p>



<p>例えばIFで条件に当てはまる文字色の色を変更するといったことも可能です。<br />是非参考にしてみてください。</p>



<p>&nbsp;</p>



<p>また、セルの背景に色を付ける方法も下記の記事にまとめています☟</p>



<p><a href="https://dokugakuexcel.com/%e3%80%90%e3%83%9e%e3%82%af%e3%83%advba%e3%80%91%e3%82%bb%e3%83%ab%e3%81%ae%e8%83%8c%e6%99%af%e3%81%ab%e8%89%b2%e3%82%92%e3%81%a4%e3%81%91%e3%82%8b%e3%83%bb%e8%a8%ad%e5%ae%9a%e3%83%bb%e5%a4%89/">【マクロVBA】セルの背景に色をつける・設定・変更！ Interior.ColorとRGBなどで指定 ► 独学エクセル塾 (dokugakuexcel.com)</a></p>



<p>それでは次回の記事でお会いしましょう。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://dokugakuexcel.com/%e3%80%90%e3%83%9e%e3%82%af%e3%83%advba%e3%80%91%e6%96%87%e5%ad%97%e3%81%ab%e8%89%b2%e3%82%92%e3%81%a4%e3%81%91%e3%82%8b%e3%83%bb%e8%a8%ad%e5%ae%9a%e3%83%bb%e5%a4%89%e6%9b%b4%ef%bc%81-font-color/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3555</post-id>	</item>
	</channel>
</rss>
