<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title></title>
</head>

<body>
<pre>


○○○A列基準でB列と比較し結果をC列へ書き込む
Option Explicit

Sub aaa()


Dim MaxRow As Integer: MaxRow = Range("A1").SpecialCells(xlLastCell).row
Dim row As Integer
Dim v1(2) As String

For row = 1 To MaxRow
    v1(1) = Cells(row, 1).Text
    v1(2) = Cells(row, 2).Text
    If v1(1) <> v1(2) Then
        With Cells(row, 3)
            .Value = "×"
            .Font.Bold = True
            .Interior.ColorIndex = 7
        End With
        
        Cells(row, 2).Interior.ColorIndex = 6
    Else
        With Cells(row, 3)
            .Value = ""
            .Interior.ColorIndex = 0
        End With
        Cells(row, 2).Interior.ColorIndex = 0
    End If
Next

End Sub


○○○1番目と2番目のシートの1行目を3番目のシートのA列と比較する
Option Explicit

Sub aaa()


Dim Sheet1 As Worksheet: Set Sheet1 = Worksheets(1)
Dim Sheet2 As Worksheet: Set Sheet2 = Worksheets(2)
Dim Sheet3 As Worksheet: Set Sheet3 = Worksheets(3)
Dim MaxRow As Integer: MaxRow = Sheet3.Range("A1").SpecialCells(xlLastCell).row
Dim MaxCol As Integer: MaxCol = Sheet1.Range("A1").SpecialCells(xlLastCell).Column
Dim i As Integer
Dim v1(2) As String
Dim row As Integer
Dim col As Integer

For row = 1 To MaxRow
    v1(1) = Sheet3.Cells(row, 1).Text
    col = row
    v1(2) = Sheet1.Cells(1, col).Text
    If v1(1) <> v1(2) Then
        Sheet3.Cells(row, 2) = "×"
        Sheet3.Cells(row, 3) = v1(2)
    End If
Next

End Sub


</pre>
</body>
