Forum Discussion

ShamsM's avatar
ShamsM
Copper Contributor
Dec 22, 2025
Solved

If Condition incorrectly evaluating flat file Date Column

Hello,   I have the following file that has the Date field coming from a Red Hat Linux environment and comes into excel as a.csv extension. I saved the file as an excel workbook and am trying to ev...
  • m_tarler's avatar
    Dec 22, 2025

    so it appears to be working in that google sheet.

    that said, if the cell is interpreted as text then changing the format of the cell to be DATE (custom format or not) will NOT convert the TEXT to be a date it will only show a value that excel sees as a date in that format.

    To convert you can use "Text to Columns" under the Data tab.

    To use a helper column/formula you want DATEVALUE() not TEXT().  you might even be able to have excel convert it by putting it in an equation.  In your case you can try:

    =IF(OR(DATEVALUE(A2)>$F$2,DATEVALUE(A2)<$F$3),"Ignore","Okay")

    or you can even try

    =IF(OR(--A2>$F$2,--A2<$F$3),"Ignore","Okay")

    where that "--" before the A2 forces a calculation and then excel usually does the conversion automatically

Resources