Excel 2013: Multicolumn Combobox Dynamic Range

jedwardo

Board Regular
Joined
Aug 21, 2012
Messages
122
Hi Everyone,

I have a userform combobox currently being populated with dynamic range "SameAs". At the moment it is populating the combobox with items from column A on sheet "Quantities" from row 6 down. How would I adjust the range to list items from column B as well? Here's what I'm using for column A:

Code:
=OFFSET(Quantities!$A$6, 0, 0, COUNTA(Quantities!$A:$A)-1,1)

I have multicolumn comboboxes working with static named ranges but can't seem to figure out how to tweak this dynamic named range to populate the combobox with 2 columns.

Thanks,
Jordan
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Instead of using a dynamic named range you could use something like this, which would go in the userform's Initialize event.
Code:
With Sheets("Quantities")
    Set rngSameAs = .Range("A6", .Range("A" & Rows.Count).End(xlUp).Offset(,1))
End With

ComboBox1.List = rngSameAs.Value

If you still want to use the named range change the last parameter from 1 to 2.
Code:
=OFFSET(Quantities!$A$6, 0, 0, COUNTA(Quantities!$A:$A)-1,2)
 
Upvote 0

Forum statistics

Threads
1,224,803
Messages
6,181,055
Members
453,014
Latest member
Chris258

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