Formula to turn Text/Number list into a Text list based on the Numbers

mimos

New Member
Joined
Sep 24, 2018
Messages
3
Is there a formulaic way to turn a list in two columns like this:
Albert3
Bob2
Charles4

<tbody>
</tbody>

into a new list in a single column like this (where the number of times that a name appears is dynamic based on the number next to it in the original data like above):

Albert
Albert
Albert
Bob
Bob
Charles
Charles
Charles
Charles

I feel like I need an incrementing variable and am not sure how to accomplish that in Excel or if it's even possible. Thanks for any assistance you can provide.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Hello,

Assuming your list starts in cell A2 ...

You could have in cell B2, an Array Formula (instead of the Enter key ... you need to use simultaneously the three keys : Control Shift Enter

Code:
=IFERROR(INDEX($A$2:$A$10,MATCH(0,COUNTIF($B$1:B1,$A$2:$A$10),0)),"")


and in cell C2

Code:
=COUNTIF($A$2:$A$10,B2)

Hope this will help
 
Upvote 0
Thanks, James - That works the other direction from what I'm trying to do. I'm starting with the Albert 2, Bob 2, Charles 4 data and trying to get the single list of names in one column, not the other way around.
 
Upvote 0
Sorry ..

Read your question too quickly ...:(
 
Upvote 0
Can be done with a helper column:


ABCDEF
1NameCountHelperList
2Albert30Albert
3Bob23Albert
4Charles45Albert
59Bob
6Bob
7Charles
8Charles
9Charles
10Charles

<tbody>
</tbody>
Sheet19

Worksheet Formulas
CellFormula
C2=SUM($B$1:$B1)
E2=IFERROR(INDEX($A$2:$A$4,MATCH(ROWS($E$2:$E2)-1,$C$2:$C$5)),"")

<tbody>
</tbody>

<tbody>
</tbody>



Probably can be done without the helper, but the formula would be much messier.
 
Upvote 0

Forum statistics

Threads
1,215,700
Messages
6,126,281
Members
449,308
Latest member
VerifiedBleachersAttendee

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