jeudi 3 janvier 2019

I cannot find why complier throws the error

The following function is to be done using this code snippet. If the value in the cell B9 has #N/A then the cell A9 must be made red in colour. The first three lines are the syntaxes that I have tried. None of them seem to work and the error "Type Mismatch" comes.

    ' If [b9] = "#N/A" Then
    ' If Range("B9").Value = "#N/A" Then
    ' If Range("B9") = #N/A Then
    Range("A9").Select
    With Selection.Interior
    .Color = -16776961
    End With

Aucun commentaire:

Enregistrer un commentaire