ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Linked Combo Boxes (https://www.excelbanter.com/excel-worksheet-functions/54944-linked-combo-boxes.html)

LRobinson3

Linked Combo Boxes
 
Is it possible to link two combo boxes so that your selection in the first
box limits the amount of information you have available in the second box?

Lotus123

Linked Combo Boxes
 

Okay, this isn't very elegant, but it worked.

I did four columns...A-D...don't ask why I skipped C :)
A B C D
Colors Things 3
Purple =IF($D$1=3,"Grass","") 1
Blue =IF($D$1=3,"Eggs","")
Green =IF($D$1=2,"Sky","")
=IF($D$1=2,"Moon","")
=IF($D$1=1,"Rain","")
=IF($D$1=1,"People","")

I created a combo box on the data in A. The resut is in D1. Depending
on the value of D1, certain items will appear in column B.

I then created a combo box for column B with the value in D2.

Problem - You get a lot of blank spaces in the second combo box.
Workaround for that problem? I created a macro to sort Column B in
descending order. I set the First Combo box to run that macro every
time the combo box changes. I then changed the Second Comob box to use
on B2:B3. It works...but you will want to merge D1 and D2 together to
get a "for sure" value of what the final result is.

Not elegant...but it will get the job done.


--
Lotus123
------------------------------------------------------------------------
Lotus123's Profile: http://www.excelforum.com/member.php...o&userid=28611
View this thread: http://www.excelforum.com/showthread...hreadid=484165


Lotus123

Linked Combo Boxes
 

Bleck...not familar with this forum I guess. Not sure why but it gets
rid of all of my extra spaces in my "sample data". As such, here is
what it should look like...

Column A has the three colors with the title Colors
Column B has the title Things with all of the formulas
Column C was empty
Column D has the 3 and 1 in it


--
Lotus123
------------------------------------------------------------------------
Lotus123's Profile: http://www.excelforum.com/member.php...o&userid=28611
View this thread: http://www.excelforum.com/showthread...hreadid=484165


LRobinson3

Linked Combo Boxes
 
Thanks Lotus123...
I'll give it a try.

"Lotus123" wrote:


Bleck...not familar with this forum I guess. Not sure why but it gets
rid of all of my extra spaces in my "sample data". As such, here is
what it should look like...

Column A has the three colors with the title Colors
Column B has the title Things with all of the formulas
Column C was empty
Column D has the 3 and 1 in it


--
Lotus123
------------------------------------------------------------------------
Lotus123's Profile: http://www.excelforum.com/member.php...o&userid=28611
View this thread: http://www.excelforum.com/showthread...hreadid=484165




All times are GMT +1. The time now is 07:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com