Creating dynamic array from drop down box

mojo476

New Member
Joined
Oct 16, 2012
Messages
1
Hi all,
I've been trying to build a dynamic array that can be changed by using 2 combo boxes. I have managed to populate an array of "pizza places" that can carry the same peer group. So that one dropdown box selects a pizza place the other selects a peer group. Currently, if I select "Pizza Hut" with peer group 1 hard coded. My array will return dominoes and pizza hut.

The data looks like
[TABLE="width: 500"]
<tbody>[TR]
[TD]pizza places
[/TD]
[TD]peer group 1
[/TD]
[TD]peer group 2
[/TD]
[TD]peer group 3
[/TD]
[/TR]
[TR]
[TD]dominoes
[/TD]
[TD]1-4
[/TD]
[TD]5-8
[/TD]
[TD]5-8[/TD]
[/TR]
[TR]
[TD]pizza hut
[/TD]
[TD]1-4
[/TD]
[TD]1-4[/TD]
[TD]1-4
[/TD]
[/TR]
[TR]
[TD]little caesars
[/TD]
[TD]5-8
[/TD]
[TD]9-12
[/TD]
[TD]9-12
[/TD]
[/TR]
[TR]
[TD]donatos
[/TD]
[TD]5-8
[/TD]
[TD]5-8[/TD]
[TD]13-17[/TD]
[/TR]
[TR]
[TD]portefinos
[/TD]
[TD]9-12
[/TD]
[TD]1-4
[/TD]
[TD]5-8
[/TD]
[/TR]
[TR]
[TD]papa johns
[/TD]
[TD]13-17
[/TD]
[TD]13-17[/TD]
[TD]1-4
[/TD]
[/TR]
</tbody>[/TABLE]

But if I want to dynamically adjust the peer groups it is returning a #value error. I am currently using Excel 2007 on a Windows XP machine.

Currently my formula is

=IF(ROWS(A7:A$7)<=$B$5,INDEX(pizzaname,SMALL(IF(peer1=$E$5,ROW(peer1)-ROW(Data!$AM$2)+1),ROWS(A7:A$7)),MATCH($A$5,Data!$1:$1,0),""))

I need to find a way to dynamically change "peer 1" named range to peer 2 and 3 dynamically using a combo box.

Thanks for any help!
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

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