PDA

View Full Version : Vague Drop Down Menu Question - Sorry!



NateW
11-22-2007, 01:18 PM
Hi, Folks.

I know detail is king here, but I'm really trying to do something I don't know a lot about - hoping someone can help me.

I want to create a drop down menu, who's contents are determined by another cell on the same worksheet. The purpose is to have the user select a trailer weight from a drop down list, but rather than having all trailer weights for all carriers, I want the macro to look to the carrier name cell to determine which carrier it is, then pick up the range of drop down menu items for that specific carrier off of another worksheet within the same workbook.

Roughly put, here's the logic that I can come up with:

If .cell(varRow, 1) = "value1" then
.cell(varRow, 2) dropdownlist items = dropdownlist items for value1

Else If .cell(varRow, 1) = "value2" then
.cell(varRow, 2) dropdownlist items = dropdownlist items for value2

And so on.... This will be in a loop to populate all cells for the entire document.

Again, sorry to be so vague, but that's as much as I can offer. Please let me know if you need any further information. Thanks so much in advance.

Cheers! :hi:

NateW
11-22-2007, 01:19 PM
Sorry, one more thing... looking at the logic example, "dropdownlist items for value2" is a range on another worksheet.

Bob Phillips
11-22-2007, 01:34 PM
See http://www.contextures.com/xlDataVal02.html



_________________________________________
UK Cambridge XL Users Conference 29-30 Nov
http://www.exceluserconference.com/UKEUC.html

NateW
11-22-2007, 01:42 PM
xld...glad to see you're on the case, you've helped me a bunch already, thanks.

Is there any way I can use VBA within a macro to do this, rather than putting the formulas manually into the spreadsheet?

Bob Phillips
11-22-2007, 01:51 PM
My version

http://www.xldynamic.com/source/xld.Dropdowns.html


__________________________________________
UK Cambridge XL Users Conference 29-30 Nov
http://www.exceluserconference.com/UKEUC.html

NateW
11-22-2007, 01:59 PM
Thanks...this is more what I'm looking for. Let me check this out, and I'll bug ya if I run into anything too crazy....thanks again...the number of beers should you ever make it up to Ontario is higher and higher! :)

Cheers!