Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am a rank beginner...
I have created a userform where I have placed a combo box. I would like the user to be able to see the first column of a Vlookup table and when they pick the desiret item, it picks then displays the other items from the choice into cells. E.g. Product code in column A, Description in Column B of VLookup table on Sheet 2 The ComboBox displays the contents of Column A. The user choose it and it places this choice on Sheet 1 in cell A1 and the description from Column B into Sheet 1 cell B1. Does this make sense. So.. how do I code it or where would you recommend I look for this information? I have ComboBox1 on my userform. Thanks! Shauna |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Shauna,
Go to the VBE and open the dialog box. Right click on the combobox and select properties. In the properties window go to Control source and type in Sheet1!A1. Than put a Vlookup formula in cell B1. Now whenever you show the form and change the combobox, the result will automatically show in A1, and the formula in B1 will calculate. -- sb "Shauna Koppang" wrote in message ... I am a rank beginner... I have created a userform where I have placed a combo box. I would like the user to be able to see the first column of a Vlookup table and when they pick the desiret item, it picks then displays the other items from the choice into cells. E.g. Product code in column A, Description in Column B of VLookup table on Sheet 2 The ComboBox displays the contents of Column A. The user choose it and it places this choice on Sheet 1 in cell A1 and the description from Column B into Sheet 1 cell B1. Does this make sense. So.. how do I code it or where would you recommend I look for this information? I have ComboBox1 on my userform. Thanks! Shauna |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Thanks for that bit of coding. It is a great help and start. I can get it insert the typed value into the cell and collect and deposit values from a VLookup table through the formula. Thanks!!!! Now I also need it to go one step further. On Sheet1 I have a combobox that needs to display a list of vendor codes. I have a VLookup table on containing the codes in column 1 and the Company name, Address, etc in the next columns. So what I need is for the userfom to display in the combobox the list of the vendor codes from the first column of the VLookuptable and when they choose it from the list, it then puts that number into a cell, then the VLoopkup formulas reference that result pulling the desired info from the remaining columns. Also, what I also need to have happen is that a user picks a name of the ordering person displayed in a combobox list and it enters it into a specified cell. Problem, the names are in a range on on Sheet2 called Names E.g. A1:A6 . The supporters of this template don't want to have to make coding changes as new neames get added, so I guess I can't create the names in ComboBox.AddItem "ZZ" format. I hope these make sense as I am just a beginner at this VB stuff. Any suggestions? Thanks! Shauna -----Original Message----- Shauna, Go to the VBE and open the dialog box. Right click on the combobox and select properties. In the properties window go to Control source and type in Sheet1!A1. Than put a Vlookup formula in cell B1. Now whenever you show the form and change the combobox, the result will automatically show in A1, and the formula in B1 will calculate. -- sb "Shauna Koppang" wrote in message ... I am a rank beginner... I have created a userform where I have placed a combo box. I would like the user to be able to see the first column of a Vlookup table and when they pick the desiret item, it picks then displays the other items from the choice into cells. E.g. Product code in column A, Description in Column B of VLookup table on Sheet 2 The ComboBox displays the contents of Column A. The user choose it and it places this choice on Sheet 1 in cell A1 and the description from Column B into Sheet 1 cell B1. Does this make sense. So.. how do I code it or where would you recommend I look for this information? I have ComboBox1 on my userform. Thanks! Shauna . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Shauna,
Easier than you thought. Use self-expanding names Define name with this formula in the refers to box =OFFSET(Sheet2!$A$1,0,0,COUNTA(Sheet2!$A:$A)-1,1) adjust the sheet name and column as needed. Change $A$1 to $A$2 if you have a header row. Now it doesn't matter how short or long the list is. Go to your form in the VBE right click on the combobox and select properties. Than for RowSource just type in the defined name. You shouldn't even need the sheet name reference like before, just the defined name. -- sb "Shauna Koppang" wrote in message ... Hi, Thanks for that bit of coding. It is a great help and start. I can get it insert the typed value into the cell and collect and deposit values from a VLookup table through the formula. Thanks!!!! Now I also need it to go one step further. On Sheet1 I have a combobox that needs to display a list of vendor codes. I have a VLookup table on containing the codes in column 1 and the Company name, Address, etc in the next columns. So what I need is for the userfom to display in the combobox the list of the vendor codes from the first column of the VLookuptable and when they choose it from the list, it then puts that number into a cell, then the VLoopkup formulas reference that result pulling the desired info from the remaining columns. Also, what I also need to have happen is that a user picks a name of the ordering person displayed in a combobox list and it enters it into a specified cell. Problem, the names are in a range on on Sheet2 called Names E.g. A1:A6 . The supporters of this template don't want to have to make coding changes as new neames get added, so I guess I can't create the names in ComboBox.AddItem "ZZ" format. I hope these make sense as I am just a beginner at this VB stuff. Any suggestions? Thanks! Shauna -----Original Message----- Shauna, Go to the VBE and open the dialog box. Right click on the combobox and select properties. In the properties window go to Control source and type in Sheet1!A1. Than put a Vlookup formula in cell B1. Now whenever you show the form and change the combobox, the result will automatically show in A1, and the formula in B1 will calculate. -- sb "Shauna Koppang" wrote in message ... I am a rank beginner... I have created a userform where I have placed a combo box. I would like the user to be able to see the first column of a Vlookup table and when they pick the desiret item, it picks then displays the other items from the choice into cells. E.g. Product code in column A, Description in Column B of VLookup table on Sheet 2 The ComboBox displays the contents of Column A. The user choose it and it places this choice on Sheet 1 in cell A1 and the description from Column B into Sheet 1 cell B1. Does this make sense. So.. how do I code it or where would you recommend I look for this information? I have ComboBox1 on my userform. Thanks! Shauna . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Combo Box & value reference | Excel Discussion (Misc queries) | |||
How to reference cell created from dropdown list in a combo box? | Excel Discussion (Misc queries) | |||
combo reference on another combo box for picking address etc. | Excel Worksheet Functions | |||
how to give cell reference using Combo Boxes in Excel? | Excel Discussion (Misc queries) | |||
dependent combo box list, with indirect reference | Excel Discussion (Misc queries) |