Elements, Ranges, Range Keys, Element Sections and Priority

Core Concepts · Tutorial 2

Elements, Ranges, Range Keys, Element Sections and Priority

Every rule in a ruleset has to know exactly which part of the table it changes, and when to run. Five fields do that job. You meet them in the Table Wizard's styling and data steps and in the back-end rule editor, and they work the same way everywhere.

The table used in every example

All results on this page were produced by Tabulizer's own range engine on this 10-row table. Rows and columns are numbered from 1, and row 1 is the header.

Row Col 1: Day Col 2: Activity Col 3: Venue Col 4: Places Col 5: Date
1 Day Activity Venue Places Date
2 Monday Yoga Studio A 12 2026-09-07
3 Monday Swimming Pool 20 2026-09-07
4 Tuesday Pilates Studio B 10 2026-09-08
5 Wednesday Aqua fit Pool 25 2026-09-09
6 Wednesday Spinning Studio A 15 2026-09-09
7 Thursday Boxing Gym 8 2026-09-10
8 Friday Swimming Pool 30 2026-09-11
9 Saturday Yoga Studio B 18 2026-09-12
10 Sunday Tennis Court 1 4 2026-09-13

1. Element: what kind of thing the rule targets

T

table

The whole table. Used for table-wide settings such as sorting, pagination, themes and export.

R

row

One or more table rows, for example the header row or every other row.

C

column

One or more columns, for example a price column that should be right-aligned.

▦

cell

Individual cells, by position or by value, for example every cell over 20.

The element decides how the range below is read: for rows and columns it selects row or column numbers, for cells it selects cells, and for the table it is a condition the whole table must meet.

2. Range: which rows, columns or cells

Counting from the end with L

Wherever a row or column number is expected you can count from the end: L1 is the last one, L2 the one before it, and so on. In a 10-row table L3 is row 8. This keeps a rule correct when the number of rows changes, for example 2-L1 for "every row except the header".

Row and column ranges

Range Meaning Rows selected
3 A single row 3
2-4 From-to 2, 3, 4
1,3,5 A list 1, 3, 5
1,L1 First and last 1, 10
2-L1 All but the first 2 to 10
> 7 / >= 7 Greater than / greater or equal 8-10 / 7-10
< 3 / <= 3 Less than / less or equal 1, 2 / 1-3
FIRST 3 / LAST 3 The first or last X 1-3 / 8-10
MOD 3 Every third row 3, 6, 9
MOD 3 [>4] Every third row, only after row 4 6, 9
ODD / EVEN Odd or even rows 1, 3, 5, 7, 9 / 2, 4, 6, 8, 10
ODD [2-6] Odd rows, only between 2 and 6 3, 5
EVEN [>4] Even rows after row 4 6, 8, 10
ALL Everything, the same as 1-L1 1-10

The part in square brackets after MOD, ODD and EVEN is a limit subrange. It accepts from-to, >, >=, <, <=, FIRST, LAST and ALL. Numbering stays the table's own: ODD [2-6] gives rows 3 and 5, not "the first and third rows after 2".

Column ranges work the same way on column numbers. On the sample table, LAST 2 selects columns 4 and 5.

Combining ranges: ; # ^

Three symbols let you build a precise selection out of simple pieces:

  • ; union: separates subranges; the result is everything any of them selects.
  • # filter: keeps only what the next part also selects.
  • ^ exclude: removes what the next part selects.

Filters and exclusions work inside their own subrange, before the union. Take <3;>=5#2-4;4-6^3-5:

The range expression split into three subranges: less than 3 selects rows 1 and 2; greater or equal to 5 filtered by 2 to 4 selects nothing; 4 to 6 excluding 3 to 5 selects row 6; the union is rows 1, 2 and 6, highlighted on the sample table.

1

<3

Rows below 3: 1, 2.

2

>=5#2-4

Rows 5 to 10, kept only if they are also between 2 and 4: none.

3

4-6^3-5

Rows 4 to 6, minus rows 3 to 5: 6.

=

Union

1, 2 plus 6: rows 1, 2 and 6.

In practice the most useful combinations are short. EVEN;1 selects the even rows and the header (1, 2, 4, 6, 8, 10), and 2-L1#ODD selects the odd data rows (3, 5, 7, 9).

Selecting rows and columns by their content

A row or column can also be chosen by what its cells contain. Text and comparison values are stored base64-encoded in the ruleset file, so the rule editor includes a Base64 encoder/decoder, and the online wizards encode for you. The tables below show the plain value and the stored form.

Range Selects rows where... Rows selected
SAME UG9vbA== ("Pool") a cell equals the text exactly 3, 5, 8
SAMEi cG9vbA== ("pool") the same, ignoring case 3, 5, 8
SAMEn UG9vbA== [3] column 3 is not "Pool" 1, 2, 4, 6, 7, 9, 10
CONTAIN U3R1ZGlv ("Studio") a cell contains the text 2, 4, 6, 9
CONTAINn U3R1ZGlv [3] column 3 does not contain "Studio" 1, 3, 5, 7, 8, 10
CONTAIN U3dpbQ== [2,3] ("Swim") column 2 or 3 contains "Swim" 3, 8
GREATER IzE4 [4] (#18) column 4 is more than 18 3, 5, 8
GREATERE IzE4 [4] (#18) column 4 is 18 or more 3, 5, 8, 9
LESS IzEw [4] (#10) column 4 is less than 10 7, 10
LESSE IzEw [4] (#10) column 4 is 10 or less 4, 7, 10
GREATER WzIwMjYtMDktMTBd [5] ([2026-09-10]) the date in column 5 is later 8, 9, 10
LESSE WzIwMjYtMDktMDhd [5] ([2026-09-08]) the date in column 5 is that day or earlier 2, 3, 4
EQUAL IzIw [4] (#20) column 4 is exactly 20 3
EQUAL WzIwMjYtMDktMDld [5] ([2026-09-09]) the date in column 5 is that day 5, 6
BETWEEN IzE1ICMyNQ== [4] (#15 #25) column 4 is from 15 to 25 3, 5, 6, 9
BETWEEN WzIwMjYtMDktMDhdIFsyMDI2LTA5LTEwXQ== [5] ([2026-09-08] [2026-09-10]) the date in column 5 is from 8 to 10 September 4, 5, 6, 7
LESS Ik1vbmRheSI= [1]^1 ("Monday") column 1 sorts before "Monday", header excluded 8

The variants follow a pattern: i ignores case, n negates, and ni does both, so the full set is SAME, SAMEi, SAMEn, SAMEni, CONTAIN, CONTAINi, CONTAINn and CONTAINni. EMPTY selects rows with an empty cell, and EMPTYT also counts cells that contain only spaces.

The value given to GREATER, GREATERE, LESS, LESSE and EQUAL says how to compare:

  • #32: a number;
  • [2026-09-10] or [-30 days]: a date, including relative dates;
  • "Jones": text, compared alphabetically.

BETWEEN takes two values of the same kind: #15 #25, [2026-09-08] [2026-09-10] or "S" "T". For numbers and dates both ends are included. For text the second value is not, so "S" "T" selects text from S up to, but not including, T.

Column and row specifiers. The optional list in square brackets, such as [4] or [4,6,8], limits the comparison to those columns (or rows, for a column rule). Use it almost every time: without it, LESS "Monday" would also compare the dates and places, and the header row "Day" would match too, which is why the example above adds ^1.

Minimum, maximum and median

MIN, MAX and MEDIAN select the row, column or cell holding the lowest, highest or middle value inside a search area, written as [row search range],[column search range]:

Range Meaning Result
MAX [2-L1],[4] Most places, data rows only Row 8 (30)
MIN [2-L1],[4] Fewest places Row 10 (4)
MEDIAN [2-L1],[4] The middle value Row 6 (15)

The search ranges accept numbers, lists, from-to, >, >=, <, <=, FIRST, LAST, ALL and the L notation, plus three relative values: SAME for the row or column currently being checked, P1, P2... for previous ones and N1, N2... for next ones. MAX [SAME],[2-L1] on a cell rule, for example, looks for the highest value within each cell's own row.

The comma between the two search ranges is required. MAX [2-L1][4], without it, selects nothing.

Cell ranges

Range Meaning Cells selected (row, column)
2,4 The cell in row 2, column 4 (2,4)
10-20 Numeric value from 10 to 20 (2,4) (3,4) (4,4) (6,4) (9,4)
< 10 / <= 10 Numeric value below 10 / up to 10 (7,4) (10,4) / also (4,4)
= 25 Numeric value equals 25 (5,4)
BETWEEN IzIwICMyNQ== (#20 #25) Numeric value from 20 to 25 (3,4) (5,4)
SAME UG9vbA== ("Pool") Text equals (3,3) (5,3) (8,3)
CONTAINi c3R1ZGlv ("studio") Text contains, ignoring case (2,3) (4,3) (6,3) (9,3)
MAX [2-L1],[4] Highest value in the search area (8,4)

Cells also accept > and >=, the other text operators (SAMEi, SAMEn, SAMEni, CONTAIN, CONTAINn, CONTAINni), EMPTY, EMPTYT, GREATER, GREATERE, LESS, LESSE, EQUAL, MIN and MEDIAN. Decimal values use a dot, as in 0-3.5.

Numeric cell ranges check every cell. On the sample table, > 20 selects the places 25 and 30, but also every date in column 5, because "2026-09-07" starts with the number 2026. Add an element section (below) to keep the rule to the columns you mean.

Table ranges

For the table element the range is a condition: the rule applies to the whole table only when it is true.

Range Applies when... Sample table
ALL always applies
ROWS > 3 the table has more than 3 rows applies
ROWS < 10 fewer than 10 rows does not apply
COLUMNS >= 5 at least 5 columns applies
CELLS > 50 more than 50 cells does not apply (50)
CONTAINi dGVubmlz ("tennis") any cell contains the text, ignoring case applies
CONTAIN QmVhY2g= ("Beach") any cell contains "Beach" does not apply

ROWS, COLUMNS and CELLS accept >, >=, < and <=, and all the SAME and CONTAIN variants work too. A typical use: turn on pagination only when ROWS > 25, so short tables stay simple.

3. Range key: counting groups instead of rows

When cells are merged (autospan), a group of rows can look like one entry. In the sample table, Monday and Wednesday each have two activities. Zebra stripes with ODD would then change colour in the middle of a day.

Range Key fixes that. Set it to the column that defines a group, here 1 for Day, and the range counter moves on only when that column's value changes, not on every row. With Range = ODD and Range Key = 1, whole days are striped: both Monday rows share one colour, Tuesday the other, both Wednesday rows the first colour again.

Range Key was called Range Count in older versions. Older rulesets that use that name keep working.

4. Element section: only part of each selected element

A range picks whole rows or whole columns. Element Section narrows each of them down to part of it. For a row rule it lists the columns to keep, and for a column rule the rows.

For example, Element = row, Range = 1-5 and Element Section = 1,3 applies the rule only to the 1st and 3rd cells of the first five rows. Another example, on the sample table: to make the places in the busiest sessions bold without touching the other columns, use Element = row, Range = GREATER IzIw [4] (more than 20 places) and Element Section = 4.

5. Priority: the order rules run in

Order matters. If one rule replaces "Y" with "In stock" and another highlights cells containing "In stock", the replacement has to run first.

By default Tabulizer decides the order itself, using the kind of work each rule does:

1

Change the data

Modification functions, then removed rows and columns, text replacements, formatting, calculations.

2

Shape the table

Cell merging (autospan), then table splits.

3

Add features

Sorting, filters, pagination, responsive patterns, scrolling, themes, charts and export.

4

Style and finish

CSS styles, then prepended or appended content and extra files.

When that order is not what you want, give a rule a Priority. Priority is a whole number, and the higher it is, the earlier the rule runs. The explicit priority is compared first; only rules with equal priority, including the default 0, fall back to the automatic order above. So a rule with priority 1 runs before every rule left at 0, whatever it does.

Leave priority at 0 unless two rules genuinely conflict. Setting it everywhere makes a ruleset harder to understand later.

Common questions

Do I have to type ranges by hand?

Not in the online wizards, which offer the common choices as options and build the range for you. The full syntax is there for the back-end rule editor and for special cases.

Do spaces and upper case matter?

Spaces are ignored, so FIRST 3 and FIRST3 are the same. Write keywords in upper case, as on this page: most of them also work in lower case, but GREATER, GREATERE, LESS, LESSE, EQUAL and BETWEEN do not. Base64 values must be copied exactly.

How do I exclude the header from a rule?

Start the range at row 2 with 2-L1, or remove row 1 from any selection with ^1, for example ODD^1.

Put ranges to work

Open the Table Wizard, add a styling or data rule, and try a range from this page on your own data.

Open the Table Wizard