Sub Ex()
Dim i%, j%, x%, max%, rg As Range
For i = 1 To 10: x = IIf(i = 10, 4, 5)
For j = 1 To 10
If j = 1 Then
Set rg = Cells(7 * j, 5 * i - 3).Resize(1, x)
Else
Set rg = Union(rg, Cells(7 * j, 5 * i - 3).Resize(1, x))
End If
Next j
rg.Interior.Color = -1 '«ì´_µL¦â
max = WorksheetFunction.max(rg)
For Each cel In rg
If cel = max Then cel.Interior.Color = RGB(255, 255, 0)
Next
Next i
End Sub
Sub Ex()
Dim i%, j%, x%, max%,rg As Range
For i = 1 To 10: x = IIf(i = 10, 4, 5)
For j = 1 To 10
If j = 1 Then
Set rg = Cells(7 * j, 5 * i - 3).Resize(1, x)
Else
Set rg = Union(rg, Cells(7 * j, 5 * i - 3).Resize(1, x))
End If
Next j
rg.Interior.Color = -1 '«ì´_µL¦â
Max = WorksheetFunction.Max(rg)
For Each cel In rg
If cel = Max Then
cel.Interior.Color = RGB(255, 255, 0): Exit For
End If
Next
Next i
End Sub