答案 0 :(得分:1)
将代码导入模块:
注释:
该表必须从A1开始导入到Sheet1中。
Option Explicit
Sub Test()
Dim Lastrow As Long, LastColumn As Long, i As Long, MaxValue As Long
With ThisWorkbook.Worksheets("Sheet1")
Lastrow = .Cells(.Rows.Count, "A").End(xlUp).Row
LastColumn = .Cells(1, .Columns.Count).End(xlToLeft).Column
For i = 2 To LastColumn
MaxValue = Application.Max(.Range(.Cells(2, i), .Cells(Lastrow, i)))
For j = 2 To Lastrow
If .Cells(j, i).Value = MaxValue Then
.Cells(j, i).Font.Bold = True
Exit For
End If
Next j
Next i
End With
End Sub