# Repeat cell until new value is reached

Options
✭✭✭

I need a column formula that will repeat cell contents until a new value is reached, then repeat those cell contents until a new value is reached, and on and on.

I want it to look like it does in this example for Column19 where the department is repeated until there is a new listing.

Any help is appreciated!

• ✭✭✭✭✭✭
Options

Try something like this:

=INDEX(Department:Department, MATCH(MAX(COLLECT([Auto Number]:[Auto Number], [Auto Number]:[Auto Number], @cell<= [Auto Number]@row, Department:Department, @cell <> "")), [Auto Number]:[Auto Number], 0))

• ✭✭✭✭✭✭
Options

Try something like this:

=INDEX(Department:Department, MATCH(MAX(COLLECT([Auto Number]:[Auto Number], [Auto Number]:[Auto Number], @cell<= [Auto Number]@row, Department:Department, @cell <> "")), [Auto Number]:[Auto Number], 0))

• ✭✭✭
Options

Works perfectly! Thanks Paul!

• ✭✭✭✭✭✭
Options

Happy to help. 👍️

• ✭✭✭
Options

Hi Paul,

Any thoughts on a column formula that would work for the Bldg 1 & Split Count and Bldg 2 & Split Count columns. Basically I want a running count of the buildings that include the split rows too.

Thank you!

• ✭✭✭✭✭✭
Options

Bld 1 & Split:

=COUNTIFS(Bldg:Bldg, OR(@cell = "Bldg 1", @cell = "Split"), [ROw ID]:[Row ID], @cell<= [Row ID]@row)

Bld 2 & Split:

=COUNTIFS(Bldg:Bldg, OR(@cell = "Bldg 2", @cell = "Split"), [ROw ID]:[Row ID], @cell<= [Row ID]@row)

• ✭✭✭
Options

This worked, thanks Paul!! Appreciate the help!

• ✭✭✭✭✭✭
Options

Happy to help. 👍️

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!