Column-Conditioned Format Rules

It would be useful to be able to evaluate format rule conditions based on the current column’s value, since they can be applied to particular columns. Here is an example use case:

  • A table where each column is conditional and returns text “Yes” or “No”.
  • All Yes should be green, all No should be red.

Currently, to implement this, you need a different format rule for each column for Yes that applies to that column only, and another rule for each column for No that applies to that column. Like so:

  1. [Column A] = “Yes”, green (applies to Column A)
  2. [Column A] = “No”, red (applies to Column A)
  3. [Column B] = “Yes”, green (applies only to Column B)
  4. [Column B] = “No”, red (applies only to Column B)
  5. [Column C] = “Yes”, green (applies to Column C)
  6. [Column C] = “No”, red (applies to Column C)
    …and so on.

This is because the condition for a format rule is evaluated for the whole row. If it was possible to evaluate the conditional on a specific column of a given row, then you could apply the same rule to multiple specified columns with different results in a given row. Like so:

  1. [_this] = “Yes”, green (applies to Columns A, B, C)
  2. [_this] = “No”, red (applies to Columns A, B, C)

This would be extremely useful in formatting certain columns based on the columns context, instead of the entire row’s, especially when the data across those columns is of the same type. Another example would be formatting any negative dollar figure as red across several columns featuring dollar figures.