
マクロの初心者です。2行毎のセルに色を付けたい時に、どのようにしたらできるのか、教えて頂けませんか。
If Cells(i, "Q") = 0 Then
Cells(i, "Q").Interior.ColorIndex = 3
End If
If Cells(i, "R") = 0 Then
Cells(i, "R").Interior.ColorIndex = 3
End If
If Cells(i, "S") = 0 Then
Cells(i, "S").Interior.ColorIndex = 3
End If
If Cells(i, "Q") >= 1 And Cells(i, "Q") < 20 Then
Cells(i, "Q").Interior.ColorIndex = 6 ' 6は 黄色
End If
If Cells(i, "R") >= 1 And Cells(i, "R") < 6 Then
Cells(i, "R").Interior.ColorIndex = 6 ' 6は 黄色
End If
If Cells(i, "R") >= 6 And Cells(i, "R") < 10 Then
Cells(i, "R").Interior.ColorIndex = 34 '34は 淡い青色
End If
If Cells(i, "S") >= 1 And Cells(i, "S") < 10 Then
Cells(i, "S").Interior.ColorIndex = 6 ' 6は 黄色
End If
If Cells(i, "T") >= 1 And Cells(i, "T") <= 48 Then
Cells(i, "T").Interior.ColorIndex = 4 ' 4は うぐいす色
End If
If WorksheetFunction.CountBlank(Range("Q" & i & ":U" & i)) = 5 Then
Cells(i, "Q").Interior.ColorIndex = 46 '46は薄いオレンジ
End If
If WorksheetFunction.CountBlank(Range("Q" & i & ":U" & i)) = 5 Then
Cells(i, "R").Interior.ColorIndex = 46 '46は薄いオレンジ
End If
If WorksheetFunction.CountBlank(Range("Q" & i & ":U" & i)) = 5 Then
Cells(i, "S").Interior.ColorIndex = 46 '46は薄いオレンジ
End If
If WorksheetFunction.CountBlank(Range("Q" & i & ":U" & i)) = 5 Then
Cells(i, "T").Interior.ColorIndex = 46 '46は薄いオレンジ
End If
If WorksheetFunction.CountBlank(Range("Q" & i & ":U" & i)) = 5 Then
Cells(i, "U").Interior.ColorIndex = 46 '46は薄いオレンジ
End If
お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!
関連するカテゴリからQ&Aを探す
おすすめ情報
デイリーランキングこのカテゴリの人気デイリーQ&Aランキング
-
EXCELで高さ0で隠れた行の素早...
-
間隔は「開く」?「空く」?
-
一部だけ行間隔を狭めたいんです。
-
Wordのコメントのフォーマット...
-
Wordの表(A4縦)で50行以上くら...
-
Wordの数式入力で行間が広くな...
-
Wordで、や「を一文字とする方法
-
wordで改行しても次のページに...
-
WORDで文字間隔が伸びる
-
CS検定(コンピュータサービ...
-
Word2007 原稿用紙に設定すると
-
初歩的な質問。 WORDで2...
-
Word97で目次を1ページで収める...
-
Excelの行高が突然、異常に大き...
-
ワードで勝手に均等割付される
-
半角英字を使った際の文字のズレ
-
Photoshopコンタクトシート作成...
-
Wordの均等割り付け 漢字とひ...
-
フォトショップエレメンツのテ...
-
オブジェクトどうしの間隔を設...
マンスリーランキングこのカテゴリの人気マンスリーQ&Aランキング
-
EXCELで高さ0で隠れた行の素早...
-
間隔は「開く」?「空く」?
-
一部だけ行間隔を狭めたいんです。
-
ワードで勝手に均等割付される
-
Wordのコメントのフォーマット...
-
Wordの表(A4縦)で50行以上くら...
-
wordで改行しても次のページに...
-
Wordの数式入力で行間が広くな...
-
Access レポートの文字間を設...
-
EXCEL の折り返し書式設定して...
-
word 文字数のずれ
-
ワードで拡大した1文字を用紙...
-
オブジェクトどうしの間隔を設...
-
CS検定(コンピュータサービ...
-
市販の便箋に印刷をしたい
-
WORDで文字間隔が伸びる
-
autocad 表の行の高さ調整
-
一太郎からWordへ変換した...
-
Wordで、や「を一文字とする方法
-
Wordの行間隔の設定について 課...
おすすめ情報