I'm trying to insert a IF/COUNTIF function to look at a range of cells and print either "UNSTABLE" or "OK". If within the range of cells are values of all 'water' or all 'oil', I want the function to say "OK". If there is any mixture of water and oil, I want the function to say "UNSTABLE". I think the problem with my function below is in the AND statement, as no matter what values are in the A:1:A4 range, the function says "OK". Does anyone know a way to fix this function, or suggest a different function to use?


A1 = water
A2 = water
A3 = oil
A4 = water

=IF(COUNTIF(A1:A4, AND("water","oil" )), "UNSTABLE","OK")