I am trying to apply a text value to a variable number of cells in one column. The number of times to be repeated is dictated by the numeric value in a cell.

I.e.
cell D1 text is "C"
cell D2 value is "23"
cell E1 text is "E"
cell E2 value is "5"

I have a table containing 33 rows (range A14:F47 including header row). I need a macro to apply the letter "C" in "23" cells starting at cell D15 and then apply the letter "E" in the next "5" cells. This example should result in 28 cells being filled. So, the range to be filled in this example will be D15 through to D42. I already have a macro to hide any unused rows in the table.

The values in cells D2 and E2 will change depending on other data entered in the worksheet. I.e. D2 could be 11 and E2 could be 4 and the remaining unused rows get hidden.