Populate column C with repeated entries based on count for each row in column A?

kznmrexcel

Board Regular
Joined
Jun 16, 2010
Messages
86
Office Version
  1. 2016
Platform
  1. MacOS
I have a worksheet that shows book copies for 921 A, B, C, etc. I need to create a list for merging out labels with the correct number of labels for each letter as entered. Example:
count921 list
1
921_A
7
921_B
2
921_C

According to this inventory sheet, I need
one label that is 921_A,
7 labels that are 921_B and
2 labels that are 921_C.

I would like a new column, "labels," (column C) that populates with:
921_A
921_B
921_B
921_B
921_B
921_B
921_B
921_B
921_C
921_C
....so I'm ready to merge out to the labels document.

If the "count" column is Column A,
"921 list" is column B, and
"labels" is to be in column C (one line item for each needed label),
is there a formula to populate column C based on the quantities entered in "count" column A for each line item in column B?

I appreciate any help with this.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Oof, just saw that I misnamed this thread with "Populate column D" when it should read "Populate column C." My apologies.
 
Upvote 0
If you are still using Excel 2016 I would use a helper column (which could be hidden once the formulas are added)
Could you use something like this?

24 03 09.xlsm
ABCD
1count921 listLabelsHelper
21921_A921_A1
37921_B921_B2
42921_C921_B9
5921_B11
6921_B11
7921_B11
8921_B11
9921_B11
10921_C11
11921_C11
12 11
13 11
Labels
Cell Formulas
RangeFormula
C2:C13C2=INDEX(B:B,MATCH(ROWS(C$2:C2),D:D))&""
D2:D13D2=SUM(A$1:A1)+1
 
Upvote 0

Forum statistics

Threads
1,215,073
Messages
6,122,975
Members
449,095
Latest member
Mr Hughes

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