Unsure how to describe - represent text n times?

inneed

New Member
Joined
May 21, 2012
Messages
2
Hi,

I have 2 columns of data - a list of text names and a list of the number of times they occur, like this example:

Name ___Coverage
cds a ___3
cds b ___2
cds c ___1
cds d ___0
cds e ___2


I'd like to get to a point where I have each text name represented the corresponding no. of times according to the coverage, like this:
cds a
cds a
cds a
cds b
cds b
cds c
cds e
cds e

...with each entry in a new cell.

Is this possible?? I'm using Excel 2010. I hope someone can help!

Thanks very much :)
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Try this - results in column C

Code:
Sub ctest()
Dim LR As Long, i As Long
LR = Range("A" & Rows.Count).End(xlUp).Row
For i = 2 To LR
    If Range("B" & i).Value > 0 Then Range("C" & Rows.Count).End(xlUp).Offset(1).Resize(Range("B" & i).Value).Value = Range("A" & i).Value
Next i
End Sub
 
Upvote 0
Hi,

I have 2 columns of data - a list of text names and a list of the number of times they occur, like this example:

Name ___Coverage
cds a ___3
cds b ___2
cds c ___1
cds d ___0
cds e ___2


I'd like to get to a point where I have each text name represented the corresponding no. of times according to the coverage, like this:
cds a
cds a
cds a
cds b
cds b
cds c
cds e
cds e

...with each entry in a new cell.

Is this possible?? I'm using Excel 2010. I hope someone can help!

Thanks very much :)
Here's a formula method if you might be interested in that:

http://www.mrexcel.com/forum/showpost.php?p=2807560&postcount=8
 
Upvote 0

Forum statistics

Threads
1,221,446
Messages
6,159,917
Members
451,603
Latest member
SWahl

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top