mardi 7 mars 2017

hh:mm:ss format causing IF statement to return False

The following IF statement will not return true. I have tried it a s a formula also and the problem seems to be the hh:mm:ss formatting. Although the cell value in column F reads as "00:15:00" it will never return true such that cell value in G becomes "Auto close".

As always any help greatly appreciated.

    Columns("F").NumberFormat = "hh:mm:ss"
    If Range("F" & i).Value = "00:15:00" Then Range("G" & i).Value = "Auto close"

Aucun commentaire:

Enregistrer un commentaire