Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Excel formula 如果excel中的任何单元格为空,则高亮显示整行_Excel Formula_Conditional Formatting - Fatal编程技术网

Excel formula 如果excel中的任何单元格为空,则高亮显示整行

Excel formula 如果excel中的任何单元格为空,则高亮显示整行,excel-formula,conditional-formatting,Excel Formula,Conditional Formatting,我有A:AD的数据。我需要将整行高亮显示为灰色,即使A:AD中的任何单元格为空 试试这个 Private Sub Worksheet_Change(ByVal Target As Range) //Change this range Set MyPlage = Range("YourRange") //Change this range For Each Cell In MyPlage Select Case Cell.Value Case Is = "W

我有A:AD的数据。我需要将整行高亮显示为灰色,即使A:AD中的任何单元格为空

试试这个

Private Sub Worksheet_Change(ByVal Target As Range)   //Change this range 
Set MyPlage = Range("YourRange") //Change this range 

For Each Cell In MyPlage  

    Select Case Cell.Value  

     Case Is = "Withdrawn"  
        Cell.EntireRow.Interior.ColorIndex = 7  

    Case Is = "Postponed"  
        Cell.EntireRow.Interior.ColorIndex = 8  

    Case Is = "Terms Agreed"  
        Cell.EntireRow.Interior.ColorIndex = 4  

    Case Is = "Papers Rec"  
        Cell.EntireRow.Interior.ColorIndex = 3  

    Case Else  
        Cell.EntireRow.Interior.ColorIndex = xlNone  

    End Select  

Next  
End Sub