Is there a way to autofill numbers in cells like a sheet?

Hi all, in a spreadsheet you can drag from the bottom right corner of a cell to autofill cells above or below with numbers that continue on, is there a equivalent way to do this in Coda?
Without the use of a formula as I’d like the contents to still be plain text and I don’t want to effect the entire column.

Thanks!

1 Like

Hi @Josh_Unwin - you could try using “Default Value” to do this. So everytime you add a row it is populated but you can overwrite it too

4 Likes

This has been bugging me for something I was making so I did a small improvement on Mallika’s version. Using the RowIDs can work on new tables but can will random results if you have deleted rows before and doesn’t take into account your numbering pattern. Which is what I needed in my table.

So again the default value, like Mallika said, you could do:

Nth(thisTable.[Column 1],thisTable.[Column 1].Count())+1

This looks for the last row and does +1 on the number. You can spam the (+) button to add many rows.

This only works when you add new rows at the bottom of the table, one at a time.
It won’t work when you add multiple rows since they will all have the same number.

Hope this helps. :slight_smile:

2 Likes

I copy/paste from Gsheets! (is that cheating?)

It automatically creates new rows. Also if you select multiple columns it populates all columns.

2 Likes

@Dalmo_Mendonca - cheating no way! All is fair in sheets and docs :wink:

That said - it is feedback for our team so we can ensure you don’t have to go all over the place to do this.

1 Like

@mallika Has this been added? I’ve found a lot of help threads addressing this but no solution so far!
My particular situation was twofold: 1) making a month column (Jan-Dec) and having to select each one by hand, when I should be able to drag the top down or autofill in some way, and 2) using lookup columns where I am looking up another table and adding a reference column based on months, there should be some way to a) autofill that process because I already have the months listed out in another column and b) not need to do a lookup column AND reference column if they’re all referring to the same thing! (months)

the column formula

Find(Column1, TableX.Column1)

where Column1 is your display column
and TableX is the table containing Column1

it results in a unique sequence number from 1 to N for each row

where N is the number of rows in TableX.

It works for inserts. It will renumber the rows if you delete from within the table.

How it works…

TableX.Column1 returns a LIST containing all the values for Column1

Find(Column1, LIST) searches the LIST for this row’s Column1 value, returning the position of the item in the LIST. So it returns this row’s position in the table.

It is more useful than RowID because it is recomputed for every inserts or deletes (or modifies that changes a row’s position in the table) and so is always a contiguous sequence with no gaps.

I use it to allocate a unique color code to every row by doing a COLOR RANGE conditional formatting, but it can be used for lots of other uses as well.

See my post [AUTOMATED Color Codes For Lookup Tables Using COLOR SCALE Conditional Formats] for an example.

Respect
Max Xyzor

Hi all,

Is there any solution for this?? Am I still supposed to do this in Excel/sheets and copy it into my coda table?
I need to be able to copy a specific number over specific ranges of cells. This is hella easy in excel and sheets.

???

Hi Christina,

Welcome to Coda!

Just a general comment: Coda works VERY different to what spreadsheets do. Some things that we do all the time in spreadsheets do not really make sense in the context of Coda. Another example you will run into, is the inability to simply reference a cell in the “previous” row.

Back to your OP, could you elaborate?
Do you have a single number, that you want to copy? That you do as in spreadsheet: copy, highlight destination, paste.
Do you have a progressive list, like months of the year? One way would be to create a table, and use that info in a lookup column.
Alternatively, if necessary, you could use the ForEach() formula to populate using logic.

Or alternatively, you can simply set up your column in a spreadsheet, and copy and paste.

It’s just a ramble
Rambling Pete

I have different needs on different occasions since I’m building out a new way to organize a data set to make use of coda features, converting from google sheets that filled a slightly different purpose.

I’d like to be able to create long sets of sequential numbers, and I also need to create sets of integers (1-26) that apply to uneven numbers of rows - for example heft 36 has 85 items, so I need “01” 85 times.

Heft 37 has 72 items so I need “02” 72 times. Heft 51 has 4 items, so I need “15” 4 times. I can do this by copying and pasting from excel but it is prone to error and I am loathe to introduce inaccuracy into the data set because I’m having to do machine processes by hand.

Hi Christina,

I have created two examples in the doc below that can assist you in auto populating rows in a table.
One example uses a counter to increment the value for each row, the second copies a static value a certain number of times into new rows.

Hope that helps a bit.

R
P

Hi Piet,

It is very kind of you to create these workarounds for my issue. Unfortunately, it would take me more time to try to figure out how they work to do a one-time process than it would take for me to just copy and paste out of excel. And, I would then have to figure out how to remove the formula (but leave the values) so that adding and moving around rows later would not lead to unintended consequences.

But I really appreciate the effort and thank you for your time.

1 Like

One last word on this topic is that I don’t need to do this to populate new rows, I need it to fill in new columns over existing rows, so I think in the end copy/paste is the best even given the risks of introducing operator error. thanks tho.

coming from notion (we are currently testing both to see which is better for our office), this is a missed feature for sure. In general ease of use is Notions strong point while functionality seems to be Codas, however neither notion or Coda seem to be able to both offer the same important table features. Notion lacks freeze, and Coda lacks the little autofill drag option which I use to copy across many cells all the time. Now that we are copying over from notion I am noticing a LOT of little QOL parts of notion I see missing in Coda. This seems like such an important tool of any database or spreadsheet.

1 Like

i would also find an autofill feature would save me a lot of time

Hi all, sharing an update on this – Launched: Auto-fill rows in your data set with AI

Try it out and let us know if you have any feedback! :slight_smile:

1 Like