Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default VLooking Reference in Combo Box

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default VLooking Reference in Combo Box

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default VLooking Reference in Combo Box

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default VLooking Reference in Combo Box

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combo Box & value reference deepak Excel Discussion (Misc queries) 1 September 30th 09 05:12 PM
How to reference cell created from dropdown list in a combo box? Vishwas Excel Discussion (Misc queries) 1 December 2nd 08 02:41 PM
combo reference on another combo box for picking address etc. kbjin Excel Worksheet Functions 1 December 8th 06 03:29 PM
how to give cell reference using Combo Boxes in Excel? Joseph Excel Discussion (Misc queries) 2 June 3rd 05 11:59 AM
dependent combo box list, with indirect reference Iyue Excel Discussion (Misc queries) 1 February 24th 05 10:45 PM


All times are GMT +1. The time now is 11:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"