View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default How to repeat a text value in a column a specified num of times?

this can be done with the countif function.

In Cell C25
=COUNTIF(A$25:A$37,A25)
A25 to A37 is the names

"JB" wrote:

This is a scheduling routine. I have a list of names in one column to which I
assign a random number, in an adjacent column. Once the random numbers are
assigned, I sort the two columns together, by the random numbers, to
randomize the list of names.

The refinement:
Each name in the list will ultimately be repeated anywhere from 0 to 3
times. I would like to assign each name a frequency value, and then
automatically generate a list with the names repeating in accordance with the
frequency number. This can be done manually, but it would be more elegant if
I could add a name and a frequency and let Excel generate the list
accordingly.

Is this doable?