create a list based on changing criteria

cddcin2

New Member
Joined
Mar 29, 2015
Messages
2
I need a formula that will create a list based on the quantity entered. My problem is having the list generate based on the quantity changing. I need it to be a single list. I've tried a number of possibilities, but the formulas seem to get too complicated after the first few cells and I can't account for all of the possible scenarios that could be entered. Any help or guidance would be greatly appreciated. In the example below the only field that would change is the "# of people". The list of "Favorite Color" would not change:

ABCDEF
1Favorite ColorBlueRedGreenYellowOrange
2# of people21323

<tbody>
</tbody>

The desired result would be:
Blue
Blue
Red
Green
Green
Green
Yellow
Yellow
Orange
Orange
Orange

<tbody>
</tbody>
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Welcome to MrExcel!

In A5, try:

Code:
=IF(ROWS(A$5:A5)>SUM(B$2:F$2),"",INDEX(B$1:F$1,MATCH(TRUE,MMULT((TRANSPOSE(COLUMN(B$1:F$1))>=COLUMN(B$1:F$1))+0,TRANSPOSE(B$2:F$2))>=ROWS(A$5:A5),0)))

Array entered, i.e. with CTRL+SHIFT+ENTER, before copying down.

Change ranges to suit.

Matty
 
Upvote 0
Thank you Matty! I was not familiar with MMULT...just read up on it and I am now. I appreciate the answer and the lesson. Cheers.
 
Upvote 0

Forum statistics

Threads
1,216,404
Messages
6,130,376
Members
449,578
Latest member
TT123

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