Four Ways to Fill and Increment (or Decrement) Cells in Modern CSV

Filling and incrementing (or decrementing) cells in spreadsheets and editors can be cumbersome. Some programs require you to use laser-like precision to click a tiny little square on the corner of the cell, use clumsy formulas, or manually type in values.

You shouldn't have to be this guy to fill cells.
You shouldn’t have to be this guy to fill cells.

I strive to make the process as easy as possible in Modern CSV. Here are four approaches you can use to fill cells and increment or decrement their values.

Middle-mouse button click dragging

When I first developed Modern CSV version 1, I thought it would be cool to use the middle mouse button to click on a cell, drag it, and fill neighboring cells with its contents. So I implemented it and it was well received.

Later, I thought it would be cool if I could press the + key on numerical cells and have it increment by 1. But if I’m doing that, I might as well have the - key decrement. And hey, what if someone wants to increment by 5? So I had it increment by 5 (or 3 or 7 or whatever) when the user presses a number key. What about decrementing by 5 (or 3 or 9, etc.)? OK, so if the user holds down the number and the - key at the same time, it’ll decrement. What about incrementing or decrementing by 10? Well, the 0 button’s sitting there. Might as well use it for that.

And thus, one of my favorite features was born.

Fill Selected Cells with Series

The click fill feature is a great tool for quick edits, but there are times the Fill Selected Cells with Series command is needed. It’s useful for the following cases:

  • You want to fill in a ton of cells.
  • You want to increment or decrement by a number greater than 10.
  • You want to increment or decrement by a decimal.
  • You want to fill in words.
  • You don’t have a middle mouse button.
  • You don’t like using the mouse.

Add or Update ID Column

I used to use the above features for ID columns until a user suggested a dedicated command. Hence, the Add or Update ID Column command was born. And I felt dumb for not thinking of it myself. Here’s what it does:

If you…it will…
don’t already have an ID columnCreate one in the first column and fill it in. You choose the starting number.
already have an ID column, but it’s emptyFill it in, and you choose the starting number.
have a partially filled ID columnFill in the gaps, starting at one above the highest number.
have a full ID columnDo nothing.

UUIDs/GUIDs

As of version 2.3, you can fill cells with UUIDs with the Fill Selected Cells with UUID/GUID command. It will let you pick from a variety of formats and you can use v4 or v7 UUIDs with the UUID Type setting. Furthermore, you can middle mouse click drag on a UUID and hit the + button to generate new UUIDs with the same format. Read more about it here.

Bonus: Append/Prepend Cell Contents

If you want to add text at the start or end of a bunch of cells, you can use the Append Cell Contents or Prepend Cell Contents commands. It gives you two options:

  • Same text for all cells.
  • Different text for each cell.

The first one will ask what that text is and append or prepend it.

The second one will give you a query just like the Fill Selected Cells with Series command.

The feature for filling by dragging the middle mouse button is in the free version. You can download it here: https://www.moderncsv.com/download

The Fill Selected Cells with Series, Add or Update ID Column, and Append/Prepend Cell Contents commands are available in the Premium versions. You can get a license key here: https://www.moderncsv.com/buy

I’m always looking for ways to make editing faster and more intuitive. Got any ideas? Click here and let me know!