CellFormat.Interior プロパティ (Excel)
ユーザーがセルの内部形式に基づいて検索条件を設定または返すことを許可する Interior オブジェクトを返します。
構文
式。インテリア
式CellFormat オブジェクトを表す変数。
例
次の使用例は、黄色で塗りつぶされたセルを検索するように検索条件を設定し、この条件を満たすセルを作成したうえで、検索を行い、結果を表示します。
Sub SearchCellFormat()
' Set the search criteria for the interior of the cell format.
With Application.FindFormat.Interior
.ColorIndex = 6
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
' Create a yellow interior for cell A5.
Range("A5").Select
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
Range("A1").Select
MsgBox "Cell A5 has a yellow interior."
' Find the cells based on the search criteria.
Cells.Find(What:="", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=True).Activate
MsgBox "Microsoft Excel has found this cell matching the search criteria."
End Sub
サポートとフィードバック
Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示