Hi
I have this formula which is based on user entering times (HH:MM european style). I want to flag if the entered entry is less than the previous entry (which would be illegal). So I'm now doing a basic if Cell2<=Cell1 then ... But this obviously only works when I enter values like Cell1=24:01 and Cell2=23:59. This is correctly flagged as error.
But that's not how data is usually entered. It would be entered as Cell1=00:01 and Cell2=23:59, but now legal combinations are flagged as well:
Cell1=00:01, Cell2=23:59, flagged as error because 00:01 is less than 23:59, even if it's just gone around and restarted.
So, I know this is basic stuff, but how can I get the flagging to occur correctly? This is Open Office, but I assume the same rules apply.
HOME 
Reply With Quote


Thanks for helpful pointer.
I just thought of a more elegant and flexible solution and that is a pre-processing of the input data. If the data rows are in a chronological order it may be helpful to run them through a ForCycle (i believe Open Office supports VBA as well?), compare the neighboring dates as it goes and adjust them if it founds a change in a date (like: 23:57 -> next -> 23:58 -> next -> 23:59 -> next -> 0:00 -> error -> add 24... etc) But then again, this would work only if the data rows are in a chronological order. So as long as the solution with the 12-hour limit works.. 