### Add row numbers to data

This step adds row number to your data.

You can:

- Name the new column
- Select what number to start with
- Select if the numbers ascend up in value or descent down in value

### Interesting uses for the *Insert row numbers* step

There are many times when you need to reference the structure of your table of data in a flow, and this step allows you to do that.

If you have a list of entries, and you need to keep the top N entries. First *Sort rows *step the data, then apply this step, then use a *Remove rows *step to keep the top N (maybe 10?) entries.

What if you need to restart the numbering process after a certain value? For example, you want the numbering to go 1, 2, 3, 4, 1, 2, 3, 4,... etc.

First, apply the *Insert row numbers* step and tell it to start at *0* and increment up. Now apply a *Insert math column* step with this formula: *({Row Number}%4)+1*. If you need a different max number than 4, replace the 4 in that formula with any number.

**Star**