Conditional format with formula on range, how to use OFFSET?

I notice conditional formatting can be applied on a range with a formula.

I also know about OFFSET.

But if I want to look at a cell to the column of the right of each cell in the range, can I do that?

All examples I’ve seen, like this one, requires a fixed starting point.

Yes, use a relative address to that column in the formula.
The use of relative/absolute addresses is very important in conditional format, when using formulas in it.
Perhaps a bit simplified, but it is as if the formula were copied across the range with the conditional format and resolved for each cell in the range.

2 Likes

I’m glad to hear that it’s possible, but could you please point me to the documentation on how to write a relative cell reference for a conditional formatting in a range? In other words, I do not know specifically how to reference the cell “to the right” of the “current” cell the formula is iterating through in the range?
EDIT: I found this now but it unfortunately did not help me either because it doesn’t contain the answer or I did not understand it.

was that screenshot posted in error? it does not appear to pertain to my comments above.

I think it is relative, you can see a condition for a range in B column that use column A values to set up the style to apply. In this case, for any value beginning with A1 cell that is greater than 15.

See Help, Addresses and References, Absolute and Relative
.
Something like this?
ConditionalCompareNeighbouringCell.ods (12.8 KB)

1 Like

But I am asking about why something like this does not work:

EDIT: Just saw the reply from @EarnestAl and am now trying to understand if that is the specific case I was asking about or not… it seems too simple to be true! :sweat_smile:

You must configure the address so that OFFSET can understand it.
=OFFSET(INDIRECT(CELL(“ADDRESS”));0;-1)
CELL() gives a string as a result, you need INDIRECT() to get an understable address.

Please in the future attach a sample file, to make easier understand what you want, and what you are doing.

1 Like

Thank you, although you did have the correct answer even in your first message, and I bet this last explicit answer also work, it took the example from Earnest to hammer it into my thick skull.

When you are dealing with a range inside a conditional formatting formula, the logical leap that relative addressing from the first cell only would in fact be translated relatively for each cell across the entire range was just too far fetched for me!