Excel VBA 双条件判断着色

单元格区域b1:c6,性别男,年龄小27的填充黄色,其他无填充色

Sub test()
Dim i As Integer, arr()
arr = Range("b1:c6")

For i = 1 To UBound(arr)
    If arr(i, 1) = "男" And arr(i, 2) < 27 Then
        Range("a" & i).Resize(1, 3).Interior.Color = 65535
    Else
        Range("a" & i).Resize(1, 3).Interior.Pattern = xlNone '无填充色
    End If
Next
End Sub

1