Formulas

icon picker
Row Order

Sometimes you need to know where a row sits in a table - is it the first or the 10th?
The RowID() formula outputs the unique row number. This means that the 10th row you create will have a RowID() equal to 10. The RowID formula doesn’t know (or care!) if you delete the first 9 rows or move the 10th row to the top of the table. It’ll say “10”, every time.
But for your purposes, you might want to have a column that reflects a row’s order in the table.
Here’s an easy formula for that.

Like it
Publish Date
Tags
1
7/14/2022
rows, tables, formulas, order
No results from filter

Description

I added some fruits as new rows, dragged to rearrange, and deleted a few.
The “RowID” column formula is: RowID(thisRow), and it gives the unique row number, including any rows that have been deleted, and disregarding their arrangement in the table.
The “Row Order” column formula is [Row Order Table].find(thisRow). This outputs the row’s absolute order in the table.
Add and drag around a few rows to see how the IDs respond.
Row Order Table
0
Fruits
RowID
Row Order
1
Steve
11
1
2
Gummy Bear
3
2
3
Grapfruit
6
3
4
Fruit
12
4
5
Apple
1
5
6
Peach
8
6
7
Pineapple
7
7
8
Orange
9
8
There are no rows in this table


Suite of Services & Logo - morning strategy logo2 (3).png


(c) morning strategy 2022
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.