Problem with conditional formatting - Calc 5.2

I have set a condition for a range of cells in a column - highlight when cell value = MIN(X1:X12). Autocalculate is turned on. The program highlights the minimum value and two other values. If I change the condition to highlight when cell value =MAX(X1:X12), two non-adjacent cells are highlighted. The range is set correctly.
Here is an example of what I get:
5242.56
6347.66
7452.76
8557.86
9662.96
10768.06
9591.48
10696.58
11801.68
2169.78
3274.88
4379.98

Makes no sense to me. This happens with LibreCalc running on Ubuntu 16.04 or Windows 7.

Found the answer!! I need to use absolute cell references, so rather than MIN(X1:X12) the condition should be set to MIN($X$1:$X$12). Not sure why this is so, but it works.