Sub RandomlyMarkCellRed()
Dim rng As Range
Dim cell As Range
Dim emptyCells As New Collection
Dim randomIndex As Integer
For Each cell In Range("B2:N14")
If cell.Interior.ColorIndex = -4142 Then
emptyCells.Add cell
End If
Next cell
If emptyCells.Count = 0 Then
MsgBox "没有找到没有颜色的单元格。"
Exit Sub
End If
randomIndex = Int((emptyCells.Count * Rnd) + 1)
Set rng = emptyCells(randomIndex)
rng.Interior.Color = RGB(255, 0, 0)
End Sub