# Repeat Values Into A Column

• Hi,

I am looking for a formula to repeat a given set of values, a certain number of times ...
See attached for visual explanation ...

TIA

## Files

If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner

• Re: Repeat Values Into A Column

Try this:

• Re: Repeat Values Into A Column

Maybe something like the attached?

Mac

## Files

• Re: Repeat Values Into A Column

Thanks a lot for the VBA solution ...
but I am after a spreadsheet Formula ...

If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner

• Re: Repeat Values Into A Column

Thanks a lot Mac for the VBA solution which is working fine ...
But, for some distribution reason, I am looking for a Formula to replicate thr VBA code ...

If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner

• Re: Repeat Values Into A Column

Oops, didn't read the question properly. If you put "0" or "=A1" in E5 and this formula in E6 and dragged down it will work for your specific example. No doubt there is a more generalised way of doing it.

Quote

=IF(COUNTIF(\$E\$5:E5,A\$1)<A\$2,A\$1,IF(COUNTIF(\$E\$5:E5,B\$1)<B\$2,B\$1,C\$1))

• Re: Repeat Values Into A Column

Stephen,

Thanks a LOT ... !!!
It is exactly what I was looking for ...
Cheers
Carim

If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner

• Re: Repeat Values Into A Column

Quote from StephenR

Oops, didn't read the question properly.

I misread as well. Oh well! No harm in offering several solutions.

My apologies,

Mac

## Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!