Populating Empty Cells In Table

Hello All,

How would you go about automatically populating a table’s blank cells with the values above them? For example:

Name Value
A 15
7
4
B 3
6
C 12
6
B 2
4

would turn into:

Name Value
A 15
A 7
A 4
B 3
B 6
C 12
C 6
B 2
B 4

I have tried with both buttons and formulas and I’m unable to find a stable solution.

The use-case will be eventually creating a new table that filters rows with values less than 10. In this case, I would like the names in the relevant name columns to be visible when the filtering occurs.

Thank you for your time!

1 Like

I seem to have solved it! In case anyone is like me, here’s a formula that works in a separate column:

thisTable.Name.Slice(1,thisTable.Find(thisRow)).Filter(CurrentValue!=“”).Last()

And if you don’t want a separate column, using buttons works too:

ModifyRows(thisRow,thisRow.Name,thisTable.Name.Slice(1,thisTable.Find(thisRow)).Filter(CurrentValue!=“”).Last())

Hope this helps someone!

2 Likes

very well done @Ed_P , I took the liberty to write a blog post about your solution:

For most readers it may not be obvious that the slicing works on a list with blanks.

3 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.